aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/gui/menus/menu.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/gui/menus/menu.gd b/client/gui/menus/menu.gd
index bdc64be0..af13d709 100644
--- a/client/gui/menus/menu.gd
+++ b/client/gui/menus/menu.gd
@@ -85,6 +85,10 @@ func _disable_recursive(node: Node, state: bool):
for c in node.get_children(): _disable_recursive(c, state)
func exit():
+ _disable_recursive(self, true)
+ if transition and transition.fading:
+ push_error("menu exit() called twice")
+ return
await self._menu_exit()
if previous_path != null:
replace_menu(previous_path)
@@ -149,6 +153,7 @@ func _input(_event):
func exit_maybe() -> void:
# Exit menu if all conditions are met
if popup != null: return
+ if transition and transition.fading: return
var time := Time.get_ticks_msec()
if time - open_since < 100: return
Sound.play_click()