summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-28 23:48:31 +0200
committerAki <nthirtyone@gmail.com>2016-08-28 23:48:31 +0200
commitadb0938f960312fef6f73640526e94d9bd3ce4ba (patch)
tree59523f3407bdb703a41bc6f45d5236a21d30e2e5
parent7a1facacf70c37d6ed2b17c2979744ef2fe8375e (diff)
downloadroflnauts-adb0938f960312fef6f73640526e94d9bd3ce4ba.zip
roflnauts-adb0938f960312fef6f73640526e94d9bd3ce4ba.tar.gz
roflnauts-adb0938f960312fef6f73640526e94d9bd3ce4ba.tar.bz2
Credits menu
-rw-r--r--config/menucredits.lua24
-rw-r--r--config/menumain.lua4
2 files changed, 26 insertions, 2 deletions
diff --git a/config/menucredits.lua b/config/menucredits.lua
new file mode 100644
index 0000000..975c962
--- /dev/null
+++ b/config/menucredits.lua
@@ -0,0 +1,24 @@
+local menu = ...
+
+local button = require "button"
+local element = require "element"
+
+local width, height = love.graphics.getWidth()/getRealScale(), love.graphics.getHeight()/getRealScale()
+local bx = width/2-29
+
+return {
+ button:new(menu)
+ :setText("Go back")
+ :setPosition(bx,144)
+ :set("active", function (self)
+ self.parent:load("menumain")
+ end)
+ ,
+ element:new(menu)
+ :setPosition(width/2, 30)
+ :set("draw", function (self, scale)
+ local x,y = self:getPosition()
+ love.graphics.printf("The year is 3587. Conflict spans the stars as huge robot armies are locked in an enduring stalemate. In their bid for galactic supremacy, they call upon the most powerful group of mercenaries in the universe: the Awesomenauts!", (x-100)*scale, (y+10)*scale, 200, "center", 0, scale, scale)
+ end)
+ ,
+} \ No newline at end of file
diff --git a/config/menumain.lua b/config/menumain.lua
index e1bd89f..70666b3 100644
--- a/config/menumain.lua
+++ b/config/menumain.lua
@@ -32,8 +32,8 @@ return {
button:new(menu)
:setText("Credits")
:setPosition(bx, 128)
- :set("isEnabled", function (self)
- return false
+ :set("active", function (self)
+ self.parent:load("menucredits")
end)
,
button:new(menu)