summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/menuhost.lua3
-rw-r--r--config/menumain.lua12
-rw-r--r--config/menuselect.lua8
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)
,