hide dialogs

This commit is contained in:
2024-11-02 22:58:30 +01:00
parent b5d57bd2e3
commit 7db2491c7d
3 changed files with 18 additions and 17 deletions

View File

@@ -108,7 +108,7 @@ 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)
show_dialog_tip()
add_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)
hide_dialop_tip()
remove_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)
hide_dialop_tip()
remove_dialop_tip()
emit_signal("say_finished")
@@ -222,9 +222,9 @@ func voice_audio_finished():
_type_player.voice_audio_finished()
func show_dialog_tip():
func add_dialog_tip():
if not _dialog_player.get_children().has(_dialog_tip):
_dialog_player.add_child(_dialog_tip)
func hide_dialop_tip():
func remove_dialop_tip():
_dialog_player.remove_child(_dialog_tip)

View File

@@ -27,6 +27,17 @@ ui_parent_control_node = NodePath("CanvasLayer/ui")
[node name="camera" parent="." instance=ExtResource( 3 )]
[node name="tooltip_layer" type="CanvasLayer" parent="."]
layer = 2
[node name="tooltip" parent="tooltip_layer" instance=ExtResource( 4 )]
z_index = 10
color = Color( 1, 1, 1, 1 )
offset_from_cursor_action1 = Vector2( 0, 30 )
offset_from_cursor_action2 = Vector2( 0, -20 )
offset_from_cursor_action3 = Vector2( 0, 30 )
offset_from_cursor_action4 = Vector2( 0, -20 )
[node name="dialog_layer" type="CanvasLayer" parent="."]
layer = 3
@@ -107,16 +118,5 @@ visible = false
[node name="video_player" parent="CanvasLayer" instance=ExtResource( 12 )]
visible = false
[node name="tooltip_layer" type="CanvasLayer" parent="."]
layer = 2
[node name="tooltip" parent="tooltip_layer" instance=ExtResource( 4 )]
z_index = 10
color = Color( 1, 1, 1, 1 )
offset_from_cursor_action1 = Vector2( 0, 30 )
offset_from_cursor_action2 = Vector2( 0, -20 )
offset_from_cursor_action3 = Vector2( 0, 30 )
offset_from_cursor_action4 = Vector2( 0, -20 )
[connection signal="pressed" from="CanvasLayer/ui/menu_button/HBoxContainer/MusicButton" to="." method="_on_MusicButton_pressed"]
[connection signal="pressed" from="CanvasLayer/ui/menu_button/HBoxContainer/MenuButton" to="." method="_on_MenuButton_pressed"]

View File

@@ -5,6 +5,7 @@ extends Control
# Make the pause menu process in pause mode and hide it just to be sure
func _ready():
self.pause_mode = Node.PAUSE_MODE_PROCESS
escoria.game_scene.hide_ui()
hide()