diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-10 00:51:04 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-10 00:51:04 +0200 |
| commit | 3adcc5ff55f84a1a7de44698eca5b5557ca1f745 (patch) | |
| tree | 9852fa2cc0970c1aa41f802deab97d6ca5134c6a /client/gui | |
| parent | c035c6e73d1e69261361370fdf1d84d69892a844 (diff) | |
| download | hurrycurry-3adcc5ff55f84a1a7de44698eca5b5557ca1f745.tar hurrycurry-3adcc5ff55f84a1a7de44698eca5b5557ca1f745.tar.bz2 hurrycurry-3adcc5ff55f84a1a7de44698eca5b5557ca1f745.tar.zst | |
Fix double-exiting menus
Diffstat (limited to 'client/gui')
| -rw-r--r-- | client/gui/menus/menu.gd | 5 |
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() |