From b5d57bd2e36511d1adbc60b72e00d44fb63b496c Mon Sep 17 00:00:00 2001 From: oier Date: Sat, 2 Nov 2024 22:54:59 +0100 Subject: [PATCH] Disable hover stack --- .../rtmi_dialog_simple.gd | 16 ++++++++++++---- project.godot | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple.gd b/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple.gd index 8972f261..32763c05 100644 --- a/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple.gd +++ b/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple.gd @@ -108,8 +108,8 @@ func do_say(global_id: String, text: String) -> void: # before we're ready, and only if it's necessary if not _dialog_player.get_children().has(_type_player): _dialog_player.add_child(_type_player) - if not _dialog_player.get_children().has(_dialog_tip): - _dialog_player.add_child(_dialog_tip) + show_dialog_tip() + _type_player.say(global_id, text) @@ -144,7 +144,7 @@ func _initialize_say_states(global_id: String, text: String, type: String) -> vo func _on_say_finished(): if not _should_preserve_dialog_box and _dialog_player.get_children().has(_type_player): _dialog_player.remove_child(_type_player) - _dialog_player.remove_child(_dialog_tip) + hide_dialop_tip() _is_saying = false @@ -211,7 +211,7 @@ func interrupt(): if not _should_preserve_dialog_box and _dialog_player.get_children().has(_type_player): _dialog_player.remove_child(_type_player) - _dialog_player.remove_child(_dialog_tip) + hide_dialop_tip() emit_signal("say_finished") @@ -220,3 +220,11 @@ func interrupt(): func voice_audio_finished(): if is_instance_valid(_type_player): _type_player.voice_audio_finished() + + +func show_dialog_tip(): + if not _dialog_player.get_children().has(_dialog_tip): + _dialog_player.add_child(_dialog_tip) + +func hide_dialop_tip(): + _dialog_player.remove_child(_dialog_tip) diff --git a/project.godot b/project.godot index 2581c32b..398cfc31 100644 --- a/project.godot +++ b/project.godot @@ -1027,7 +1027,7 @@ rtmi_dialog_simple/clear_text_by_click_only=false rtmi_dialog_simple/reading_speed_in_wpm=200 rtmi_dialog_simple/left_click_action="Speed up" rtmi_dialog_simple/stop_talking_animation_on="End of audio" -debug/enable_hover_stack_viewer=true +debug/enable_hover_stack_viewer=false ui/dialogs_chooser="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd" rtmi_ui/sound_library_folder="res://gymkhana/sounds/" rtmi_ui/savegame_enabled=false