From 93d3257ff23331c308fb32940557911a29ca608b Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 6 Apr 2017 19:22:26 +0200 Subject: Menu cleaned-up and moved to /not/ Menu is now similar to new code Menu.load => Menu.open --- config/menumain.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/menumain.lua') diff --git a/config/menumain.lua b/config/menumain.lua index 50b3d56..4e5ef1f 100644 --- a/config/menumain.lua +++ b/config/menumain.lua @@ -14,7 +14,7 @@ return { :setText("Start") :setPosition(bx, 80) :set("active", function (self) - self.parent:load("menuhost") + self.parent:open("menuhost") end) , button:new(menu) @@ -28,14 +28,14 @@ return { :setText("Settings") :setPosition(bx, 112) :set("active", function (self) - self.parent:load("menusettings") + self.parent:open("menusettings") end) , button:new(menu) :setText("Credits") :setPosition(bx, 128) :set("active", function (self) - self.parent:load("menucredits") + self.parent:open("menucredits") end) , button:new(menu) -- cgit v1.1 From 37767d6c54ea6af0b4631b5ce838ee584603895e Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 7 Apr 2017 02:53:36 +0200 Subject: Moved menu configs to subdirectory --- config/menumain.lua | 59 ----------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 config/menumain.lua (limited to 'config/menumain.lua') diff --git a/config/menumain.lua b/config/menumain.lua deleted file mode 100644 index 4e5ef1f..0000000 --- a/config/menumain.lua +++ /dev/null @@ -1,59 +0,0 @@ -local menu = ... - -local button = require "button" -local header = require "header" -local element = require "element" - -local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() -local bx = width/2-29 - -local awesometwo = love.graphics.newImage("assets/two.png") - -return { - button:new(menu) - :setText("Start") - :setPosition(bx, 80) - :set("active", function (self) - self.parent:open("menuhost") - end) - , - button:new(menu) - :setText("Join") - :setPosition(bx, 96) - :set("isEnabled", function (self) - return false - end) - , - button:new(menu) - :setText("Settings") - :setPosition(bx, 112) - :set("active", function (self) - self.parent:open("menusettings") - end) - , - button:new(menu) - :setText("Credits") - :setPosition(bx, 128) - :set("active", function (self) - self.parent:open("menucredits") - end) - , - button:new(menu) - :setText("Exit") - :setPosition(bx, 144) - :set("active", love.event.quit) - , - element:new(menu) - :setPosition(width/2, 15) - :set("draw", function (self, scale) - local x,y = self:getPosition() - love.graphics.setColor(255, 255, 255, 255) - love.graphics.setFont(Bold) - love.graphics.draw(awesometwo, x*scale, y*scale, 0, scale, scale, 35) - end) - , - header:new(menu) - :setText("Roflnauts") - :setPosition(width/2,40) - , -} \ No newline at end of file -- cgit v1.1