hide dialog chooser & floating when paused. Fixes #53
This commit is contained in:
@@ -14,6 +14,8 @@ var _no_more_options: bool = false
|
||||
func _ready() -> void:
|
||||
hide_chooser()
|
||||
pause_mode = PAUSE_MODE_STOP
|
||||
escoria.connect("paused", self, "_on_paused")
|
||||
escoria.connect("resumed", self, "_on_resumed")
|
||||
|
||||
|
||||
# Process the timeout display
|
||||
@@ -98,3 +100,12 @@ func _on_Timer_timeout() -> void:
|
||||
func _remove_avatar():
|
||||
if $AvatarContainer.get_child_count() > 0:
|
||||
$AvatarContainer.remove_child($AvatarContainer.get_child(0))
|
||||
|
||||
# Handler managing pause notification from Escoria
|
||||
func _on_paused():
|
||||
hide_chooser()
|
||||
|
||||
|
||||
# Handler managing resume notification from Escoria
|
||||
func _on_resumed():
|
||||
show_chooser()
|
||||
@@ -235,6 +235,7 @@ func _on_dialog_finished():
|
||||
func _on_paused():
|
||||
if tween.is_active():
|
||||
is_paused = true
|
||||
visible = false
|
||||
tween.stop_all()
|
||||
|
||||
|
||||
@@ -242,6 +243,7 @@ func _on_paused():
|
||||
func _on_resumed():
|
||||
if not tween.is_active():
|
||||
is_paused = false
|
||||
visible = true
|
||||
tween.resume_all()
|
||||
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ func get_item(global_id: String) -> ESCItem:
|
||||
)
|
||||
return null
|
||||
|
||||
return node
|
||||
return node
|
||||
|
||||
@@ -393,23 +393,21 @@ func unpause_game():
|
||||
escoria.object_manager.get_object(ESCObjectManager.SPEECH).node.resume()
|
||||
escoria.main.current_scene.game.show_ui()
|
||||
escoria.main.current_scene.show()
|
||||
escoria.set_game_paused(false)
|
||||
|
||||
func pause_game():
|
||||
if get_video_player().is_playing():
|
||||
get_video_player().skip()
|
||||
return
|
||||
if not get_node(pause_menu).visible:
|
||||
get_node(main_menu).reset()
|
||||
if not get_node(pause_menu).visible and not get_node(main_menu).visible:
|
||||
get_node(pause_menu).reset()
|
||||
get_node(pause_menu).set_save_enabled(
|
||||
escoria.save_manager.save_enabled
|
||||
)
|
||||
get_node(pause_menu).set_save_enabled(escoria.save_manager.save_enabled)
|
||||
get_node(pause_menu).show()
|
||||
escoria.object_manager.get_object(ESCObjectManager.CAMERA).node.current = false
|
||||
escoria.object_manager.get_object(ESCObjectManager.SPEECH).node.pause()
|
||||
escoria.main.current_scene.game.hide_ui()
|
||||
escoria.main.current_scene.hide()
|
||||
|
||||
escoria.set_game_paused(true)
|
||||
|
||||
func apply_custom_settings(custom_settings: Dictionary):
|
||||
if custom_settings.has("a_custom_setting"):
|
||||
|
||||
Reference in New Issue
Block a user