summaryrefslogtreecommitdiffhomepage
path: root/not
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-08-01 04:09:45 +0200
committerAki <nthirtyone@gmail.com>2017-08-01 04:09:45 +0200
commitbc625807322a7fc7f16a2c228670c85d292e878f (patch)
treeda8410997637237f39e4af8f77fbc4ea0d5e5369 /not
parent0dbb0a6ef0ee24bd4fbd293cdf40a3f066887bb6 (diff)
downloadroflnauts-bc625807322a7fc7f16a2c228670c85d292e878f.zip
roflnauts-bc625807322a7fc7f16a2c228670c85d292e878f.tar.gz
roflnauts-bc625807322a7fc7f16a2c228670c85d292e878f.tar.bz2
Added short input from taking input
Diffstat (limited to 'not')
-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()