summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/menumain.lua46
-rw-r--r--config/menustart.lua6
2 files changed, 35 insertions, 17 deletions
diff --git a/config/menumain.lua b/config/menumain.lua
index 7c8ddf9..543a858 100644
--- a/config/menumain.lua
+++ b/config/menumain.lua
@@ -1,28 +1,44 @@
+local menu = ...
+
local button = require "button"
+local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
+local button_x = width/2-29
+
return {
- button
- :new("start")
- :setPosition(10,40)
+ button:new(menu)
+ :setText("start")
+ :setPosition(button_x,60)
:set("active", function ()
changeScene(Menu:new("menustart"))
end)
,
- button
- :new("join")
- :setPosition(10,50)
+ button:new(menu)
+ :setText("join")
+ :setPosition(button_x,76)
,
- button
- :new("settings")
- :setPosition(10,60)
+ button:new(menu)
+ :setText("settings")
+ :setPosition(button_x,92)
,
- button
- :new("credits")
- :setPosition(10,70)
+ button:new(menu)
+ :setText("credits")
+ :setPosition(button_x,108)
,
- button
- :new("exit")
- :setPosition(10,80)
+ button:new(menu)
+ :setText("exit")
+ :setPosition(button_x,124)
:set("active", love.event.quit)
,
+ button:new(menu)
+ :setText("NEVER")
+ :setPosition(button_x,140)
+ :set("focus", function (self, next)
+ if next then
+ self.parent:next()
+ else
+ self.parent:previous()
+ end
+ end)
+ ,
} \ No newline at end of file
diff --git a/config/menustart.lua b/config/menustart.lua
index 03ca2f2..46015a9 100644
--- a/config/menustart.lua
+++ b/config/menustart.lua
@@ -1,8 +1,10 @@
+local menu = ...
+
local button = require "button"
return {
- button
- :new("WORKED")
+ button:new(menu)
+ :setText("Go back")
:setPosition(10,40)
:set("active", function ()
changeScene(Menu:new("menumain"))