diff options
author | Aki <nthirtyone@gmail.com> | 2017-04-07 02:53:36 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-04-07 02:53:36 +0200 |
commit | 37767d6c54ea6af0b4631b5ce838ee584603895e (patch) | |
tree | e0dd1549c5a8f3342b36df9469660046c8c03208 /config/menus/host.lua | |
parent | 20770db3aba953585495d21bfe0a2e430485b038 (diff) | |
download | roflnauts-37767d6c54ea6af0b4631b5ce838ee584603895e.zip roflnauts-37767d6c54ea6af0b4631b5ce838ee584603895e.tar.gz roflnauts-37767d6c54ea6af0b4631b5ce838ee584603895e.tar.bz2 |
Moved menu configs to subdirectory
Diffstat (limited to 'config/menus/host.lua')
-rw-r--r-- | config/menus/host.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua new file mode 100644 index 0000000..47aaa5e --- /dev/null +++ b/config/menus/host.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/maps.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: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 |