aboutsummaryrefslogtreecommitdiff
path: root/client/menu/menu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r--client/menu/menu.gd3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd
index 65ffa708..5d6946cf 100644
--- a/client/menu/menu.gd
+++ b/client/menu/menu.gd
@@ -28,8 +28,10 @@ signal submenu_close()
const transition_scene = preload("res://menu/scene_transition.tscn")
var transition: SceneTransition
var parent_menu: Menu = null
+var open_since
func _ready():
+ open_since = Time.get_ticks_msec()
focus_first(self)
connect_button_sounds(self)
update_parent_menu(self.get_parent())
@@ -117,6 +119,7 @@ func update_parent_menu(node: Node):
func _input(_event):
if popup != null: return
+ if Time.get_ticks_msec() - open_since < 100: return
if Input.is_action_just_pressed("ui_cancel"):
Sound.play_click()
exit()