summaryrefslogtreecommitdiffhomepage
path: root/config/menus/host.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-04-09 22:07:04 +0200
committerAki <nthirtyone@gmail.com>2017-04-09 22:07:04 +0200
commit0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (patch)
tree8d270eb07f589d2487b3ce66d4865e5a4718042a /config/menus/host.lua
parent55b0cf1a22e4a7e41fe00aa693445d6c4bd0652d (diff)
parenta03c1125f10fbbad253a0efc4727072fcbd55345 (diff)
downloadroflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.zip
roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.gz
roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.bz2
Merge branch 'com'
Diffstat (limited to 'config/menus/host.lua')
-rw-r--r--config/menus/host.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua
new file mode 100644
index 0000000..b318a5b
--- /dev/null
+++ b/config/menus/host.lua
@@ -0,0 +1,45 @@
+local menu = ...
+
+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)
+
+require "iconsList"
+local icons, maps = getMapsIconsList()
+
+return {
+ map_selector
+ :setPosition(width/2, 40)
+ :setSize(80, 42)
+ :setMargin(0)
+ :set("global", true)
+ :set("first", true)
+ :set("list", maps)
+ :set("icons_i", love.graphics.newImage("assets/maps.png"))
+ :set("icons_q", icons)
+ :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:open("select")
+ end)
+ ,
+ button:new(menu)
+ :setText("Go back")
+ :setPosition(bx,117)
+ :set("active", function (self)
+ self.parent:open("main")
+ end)
+ ,
+} \ No newline at end of file