Skip to content

Commit

Permalink
Merge pull request #205 from worron/fix_unwanted_unpause
Browse files Browse the repository at this point in the history
Fix unwanted game unpause (close #203)
  • Loading branch information
worron authored Dec 8, 2024
2 parents 4b1cfee + d3b241d commit d8eee0f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions addons/panku_console/modules/interactive_shell/module.gd
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,20 @@ func update_gui_state():

if is_gui_open == _is_gui_open:
return

if _is_gui_open != is_gui_open:
core._shell_visibility = is_gui_open
core.interactive_shell_visibility_changed.emit(is_gui_open)
_is_gui_open = is_gui_open

if _is_gui_open and pause_if_input:
_was_tree_paused = core.get_tree().paused
core.get_tree().paused = true
else:
if core.get_tree().paused:
core.get_tree().paused = _was_tree_paused

if pause_if_input:
if _is_gui_open:
_was_tree_paused = core.get_tree().paused
core.get_tree().paused = true
else:
if core.get_tree().paused:
core.get_tree().paused = _was_tree_paused

if unified_window_visibility:
core.windows_manager.visible = _is_gui_open

Expand Down

0 comments on commit d8eee0f

Please sign in to comment.