summaryrefslogtreecommitdiffhomepage
path: root/config/menuhost.lua
diff options
context:
space:
mode:
Diffstat (limited to 'config/menuhost.lua')
-rw-r--r--config/menuhost.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/config/menuhost.lua b/config/menuhost.lua
new file mode 100644
index 0000000..710839d
--- /dev/null
+++ b/config/menuhost.lua
@@ -0,0 +1,42 @@
+local menu = ...
+
+local button = require "button"
+local selector = require "selector"
+
+local width, height = love.graphics.getWidth()/getScale(), love.graphics.getHeight()/getScale()
+local bx = width/2-29
+
+local map_selector = selector:new(menu)
+
+return {
+ map_selector
+ :setPosition(width/2, 40)
+ :setSize(80, 42)
+ :setMargin(0)
+ :set("global", true)
+ :set("first", true)
+ :set("list", require "maplist")
+ :set("icons_i", love.graphics.newImage("assets/placeholder-map-icon.png"))
+ :set("icons_q", require "mapicons")
+ :set("shape", "panorama")
+ :init()
+ ,
+ button:new(menu)
+ :setText("Next")
+ :setPosition(bx,101)
+ :set("isEnabled", function ()
+ return map_selector:isLocked()
+ end)
+ :set("active", function (self)
+ MAP = map_selector:getFullSelection(true)[1][1] -- please, don't kill me for this, kek
+ self.parent:load("menuselect")
+ end)
+ ,
+ button:new(menu)
+ :setText("Go back")
+ :setPosition(bx,117)
+ :set("active", function (self)
+ self.parent:load("menumain")
+ end)
+ ,
+} \ No newline at end of file