summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--not/Menu.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/not/Menu.lua b/not/Menu.lua
index b7fc7ed..f6da354 100644
--- a/not/Menu.lua
+++ b/not/Menu.lua
@@ -71,11 +71,22 @@ function Menu:previous ()
end
end
+-- @Override
+function Menu:isInputDisabled ()
+ if self.inputBreakTimer then
+ return self.inputDisabled or self.inputBreakTimer > 0
+ end
+ return self.inputDisabled
+end
+
-- LÖVE2D callbacks
function Menu:update (dt)
for _,element in pairs(self.elements) do
element:update(dt)
end
+ if self.inputBreakTimer and self.inputBreakTimer > 0 then
+ self.inputBreakTimer = self.inputBreakTimer - dt
+ end
end
function Menu:draw ()
local scale = getScale()