diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-05 02:11:07 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-05 02:11:07 +0200 |
commit | e8c85303a138e44e1bbe7613c0e6db8d5b7c1fb6 (patch) | |
tree | ca5ba1492fbdee592f4e470423a0a6440ffaffd1 /config/menus | |
parent | 78654392715768991cb10fc7c1aca60859e58516 (diff) | |
download | roflnauts-e8c85303a138e44e1bbe7613c0e6db8d5b7c1fb6.zip roflnauts-e8c85303a138e44e1bbe7613c0e6db8d5b7c1fb6.tar.gz roflnauts-e8c85303a138e44e1bbe7613c0e6db8d5b7c1fb6.tar.bz2 |
Force start and countdown; selectors properly placed
Diffstat (limited to 'config/menus')
-rw-r--r-- | config/menus/select.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/config/menus/select.lua b/config/menus/select.lua index c4a9595..2341556 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -37,10 +37,10 @@ do group:set("margin", 16) local gw, gh = group:getSize() - group:setPosition((width - gw)/2, 10) + group:setPosition((width - gw)/2, 55) function get () - local selection = group:callEach("getSelected") + local selection = group:callEach("getLocked") for i,naut in ipairs(selection) do selection[i] = {naut, Controller.getSets()[i]} end @@ -55,7 +55,7 @@ return { :setText("Force start") :setPosition(bx,134) :set("isEnabled", function () - return true + return #get() > 1 end) :set("active", function (self) sceneManager:changeScene(World(MAP, get())) @@ -83,8 +83,7 @@ return { end end) :set("update", function (self, dt) - local total = 0 - if total > 1 then + if #get() > 1 then self.the_final_countdown = self.the_final_countdown - dt else self.the_final_countdown = 9 |