summaryrefslogtreecommitdiffhomepage
path: root/config/menus/host.lua
diff options
context:
space:
mode:
Diffstat (limited to 'config/menus/host.lua')
-rw-r--r--config/menus/host.lua25
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
+}