diff options
author | Aki <nthirtyone@gmail.com> | 2016-08-28 20:41:48 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-08-28 20:41:48 +0200 |
commit | 96b4407ae6410affd0db1e6d6d657d4f65d32235 (patch) | |
tree | 6bace9e2efac1f9aa9499f0b841ade56c1feab5f /config | |
parent | f3318c4549a63ed151577b0ee0742440f780e4ca (diff) | |
download | roflnauts-96b4407ae6410affd0db1e6d6d657d4f65d32235.zip roflnauts-96b4407ae6410affd0db1e6d6d657d4f65d32235.tar.gz roflnauts-96b4407ae6410affd0db1e6d6d657d4f65d32235.tar.bz2 |
No blinking; buttons enabled/disabled
Diffstat (limited to 'config')
-rw-r--r-- | config/menuhost.lua | 3 | ||||
-rw-r--r-- | config/menumain.lua | 12 | ||||
-rw-r--r-- | config/menuselect.lua | 8 |
3 files changed, 15 insertions, 8 deletions
diff --git a/config/menuhost.lua b/config/menuhost.lua index 6e52482..487b75f 100644 --- a/config/menuhost.lua +++ b/config/menuhost.lua @@ -24,6 +24,9 @@ return { button:new(menu) :setText("Select") :setPosition(bx,101) + :set("isEnabled", function () + return map_selector:isLocked() + end) :set("active", function (self) MAP = map_selector:getFullSelection(true)[1][1] self.parent:load("menuselect") diff --git a/config/menumain.lua b/config/menumain.lua index 2ca2c59..e1bd89f 100644 --- a/config/menumain.lua +++ b/config/menumain.lua @@ -18,22 +18,22 @@ return { button:new(menu) :setText("Join") :setPosition(bx, 96) - :set("active", function (self) - self:blink() + :set("isEnabled", function (self) + return false end) , button:new(menu) :setText("Settings") :setPosition(bx, 112) - :set("active", function (self) - self:blink() + :set("isEnabled", function (self) + return false end) , button:new(menu) :setText("Credits") :setPosition(bx, 128) - :set("active", function (self) - self:blink() + :set("isEnabled", function (self) + return false end) , button:new(menu) diff --git a/config/menuselect.lua b/config/menuselect.lua index 31cf02e..c79396c 100644 --- a/config/menuselect.lua +++ b/config/menuselect.lua @@ -24,12 +24,16 @@ return { start_button :setText("Force start") :setPosition(bx,134) + :set("isEnabled", function () + if #naut_selector:getFullSelection(false) > 1 then + return true + end + return false + end) :set("active", function (self) local nauts = naut_selector:getFullSelection(false) if #nauts > 1 then changeScene(World:new(MAP, nauts)) - else - self:blink() end end) , |