diff options
author | Aki <nthirtyone@gmail.com> | 2017-08-13 02:26:55 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-08-13 02:26:55 +0200 |
commit | b1cf14d64a2d3e28683db87190c4b2c7799c259d (patch) | |
tree | e45dac5cc6ce5265e3e3e2c914eb7cc92a820b8b /config/menus/host.lua | |
parent | 0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (diff) | |
parent | ed62b573417bdc85bec616f6016846b02de4c906 (diff) | |
download | roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.zip roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.gz roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.bz2 |
Merge branch 'multi'maps
Diffstat (limited to 'config/menus/host.lua')
-rw-r--r-- | config/menus/host.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua index b318a5b..a180736 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -1,18 +1,23 @@ -local menu = ... +local menu, background = ... -local button = require "not.Button" -local selector = require "not.Selector" +local Button = require "not.Button" +local Selector = require "not.Selector" local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale() local bx = width/2-29 -local map_selector = selector:new(menu) +local map_Selector = Selector(menu) require "iconsList" local icons, maps = getMapsIconsList() +if background == nil or not background:is(require "not.MenuBackground") then + background = require "not.MenuBackground"(menu) +end + return { - map_selector + background, + map_Selector :setPosition(width/2, 40) :setSize(80, 42) :setMargin(0) @@ -24,22 +29,22 @@ return { :set("shape", "panorama") :init() , - button:new(menu) + Button(menu) :setText("Next") :setPosition(bx,101) :set("isEnabled", function () - return map_selector:isLocked() + return map_Selector:isLocked() end) :set("active", function (self) - MAP = map_selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek + MAP = map_Selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek self.parent:open("select") end) , - button:new(menu) + Button(menu) :setText("Go back") :setPosition(bx,117) :set("active", function (self) self.parent:open("main") end) , -}
\ No newline at end of file +} |