summaryrefslogtreecommitdiffhomepage
path: root/config/menumain.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-22 17:10:20 +0200
committerAki <nthirtyone@gmail.com>2016-08-22 17:10:20 +0200
commite57a5b0b77c1ba3a2f05371c551d0e61fc9ce709 (patch)
tree877e630b0afd749d5d75da830d3339dd751abaca /config/menumain.lua
parent6e9aa28e70ec842db643a06609454fff54b5d86a (diff)
downloadroflnauts-e57a5b0b77c1ba3a2f05371c551d0e61fc9ce709.zip
roflnauts-e57a5b0b77c1ba3a2f05371c551d0e61fc9ce709.tar.gz
roflnauts-e57a5b0b77c1ba3a2f05371c551d0e61fc9ce709.tar.bz2
Graphics, animation, general improvements
Diffstat (limited to 'config/menumain.lua')
-rw-r--r--config/menumain.lua46
1 files changed, 31 insertions, 15 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