mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
add beautiful support to invaders.lua and change Garoth' name
This commit adds beautiful support to invaders.lua and changes Garoth' name in the top comment to his full name + nickname
This commit is contained in:
parent
32ea9f46ca
commit
b3518691cf
1 changed files with 25 additions and 14 deletions
|
@ -5,7 +5,7 @@
|
|||
----------------------------------------------------------------------------
|
||||
|
||||
--{{{ Space Invaders for awesome 3 GIT by Gregor "farhaven" Best
|
||||
-- The ultra-cool retro graphics are done by Garoth.
|
||||
-- The ultra-cool retro graphics are done by Andrei "Garoth" Thorp.
|
||||
--
|
||||
-- Use Left and Right to control motion, Space to fire, q quits the game,
|
||||
-- s creates a screenshot in ~/.cache/awesome (needs ImageMagick).
|
||||
|
@ -25,6 +25,7 @@
|
|||
local wibox = wibox
|
||||
local widget = widget
|
||||
local awful = require("awful")
|
||||
local beautiful = awful.beautiful.get()
|
||||
local keygrabber = keygrabber
|
||||
local image = image
|
||||
|
||||
|
@ -56,7 +57,7 @@ local enemies = { }
|
|||
function player.new ()
|
||||
local p = { }
|
||||
|
||||
p.base = wibox({ position = "floating", bg = "#00000000" })
|
||||
p.base = wibox({ position = "floating", bg = "#12345600" })
|
||||
p.base:geometry({ width = 24,
|
||||
height = 16,
|
||||
x = gamedata.field.x + (gamedata.field.w / 2),
|
||||
|
@ -424,7 +425,9 @@ function game.highscore (score)
|
|||
if s <= score then newentry = true end
|
||||
end
|
||||
|
||||
gamedata.highscore.window = wibox({ position = "floating" })
|
||||
gamedata.highscore.window = wibox({ position = "floating",
|
||||
bg = beautiful.bg_focus or "#333333",
|
||||
fg = beautiful.fg_focus or "#FFFFFF" })
|
||||
gamedata.highscore.window:geometry({ height = 20, width = 300,
|
||||
x = gamedata.field.x + math.floor(gamedata.field.w / 2) - 150,
|
||||
y = gamedata.field.y + math.floor(gamedata.field.h / 2) })
|
||||
|
@ -453,11 +456,13 @@ function run()
|
|||
gamedata.player = player.new()
|
||||
|
||||
|
||||
gamedata.field.north = wibox({ position = "floating", bg = "#333333" })
|
||||
gamedata.field.north = wibox({ position = "floating",
|
||||
bg = beautiful.bg_focus or "#333333",
|
||||
fg = beautiful.fg_focus or "#FFFFFF" })
|
||||
gamedata.field.north:geometry({ width = gamedata.field.w + 10,
|
||||
height = 15,
|
||||
x = gamedata.field.x - 5,
|
||||
y = gamedata.field.y - 15 })
|
||||
height = 15,
|
||||
x = gamedata.field.x - 5,
|
||||
y = gamedata.field.y - 15 })
|
||||
gamedata.field.north.screen = gamedata.screen
|
||||
|
||||
gamedata.field.status = widget({ type = "textbox", name = "status", align = "right" })
|
||||
|
@ -468,20 +473,26 @@ function run()
|
|||
|
||||
gamedata.field.north:widgets({ gamedata.field.caption, gamedata.field.status })
|
||||
|
||||
gamedata.field.south = wibox({ position = "floating", bg = "#333333" })
|
||||
gamedata.field.south = wibox({ position = "floating",
|
||||
bg = beautiful.bg_focus or "#333333",
|
||||
fg = beautiful.fg_focus or "#FFFFFF" })
|
||||
gamedata.field.south:geometry({ width = gamedata.field.w, height = 5,
|
||||
x = gamedata.field.x,
|
||||
y = gamedata.field.y + gamedata.field.h - 5 })
|
||||
gamedata.field.south.screen = gamedata.screen
|
||||
|
||||
gamedata.field.west = wibox({ position = "floating", bg = "#333333" })
|
||||
gamedata.field.west:geometry({ width = 5,
|
||||
height = gamedata.field.h,
|
||||
x = gamedata.field.x - 5,
|
||||
y = gamedata.field.y })
|
||||
gamedata.field.west = wibox({ position = "floating",
|
||||
bg = beautiful.bg_focus or "#333333",
|
||||
fg = beautiful.fg_focus or "#FFFFFF" })
|
||||
gamedata.field.west:geometry({ width = 5,
|
||||
height = gamedata.field.h,
|
||||
x = gamedata.field.x - 5,
|
||||
y = gamedata.field.y })
|
||||
gamedata.field.west.screen = gamedata.screen
|
||||
|
||||
gamedata.field.east = wibox({ position = "floating", bg = "#333333" })
|
||||
gamedata.field.east = wibox({ position = "floating",
|
||||
bg = beautiful.bg_focus or "#333333",
|
||||
fg = beautiful.fg_focus or "#FFFFFF" })
|
||||
gamedata.field.east:geometry({ width = 5,
|
||||
height = gamedata.field.h,
|
||||
x = gamedata.field.x + gamedata.field.w,
|
||||
|
|
Loading…
Reference in a new issue