diff options
author | Aki <nthirtyone@gmail.com> | 2017-06-27 09:02:03 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-06-27 09:02:03 +0200 |
commit | baf04a055dbc66b80c29a406907a0a595ac55f00 (patch) | |
tree | 49559118c1c6246cf7f954e9f706bae6f29e5057 /config/menus/host.lua | |
parent | 2c458f0c756ebe577083a7cc972a07e870cb0ba9 (diff) | |
download | roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.zip roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.gz roflnauts-baf04a055dbc66b80c29a406907a0a595ac55f00.tar.bz2 |
Moved ui elements to use new oop lib
Diffstat (limited to 'config/menus/host.lua')
-rw-r--r-- | config/menus/host.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua index b318a5b..fff683c 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -1,18 +1,18 @@ local menu = ... -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() return { - map_selector + map_Selector :setPosition(width/2, 40) :setSize(80, 42) :setMargin(0) @@ -24,18 +24,18 @@ 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) |