From e8c85303a138e44e1bbe7613c0e6db8d5b7c1fb6 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 5 Sep 2017 02:11:07 +0200 Subject: Force start and countdown; selectors properly placed --- config/menus/select.lua | 9 ++++----- 1 file 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 -- cgit v1.1