diff --git a/balloon/dvn_balloon.gd b/balloon/dvn_balloon.gd new file mode 100644 index 0000000..37ca186 --- /dev/null +++ b/balloon/dvn_balloon.gd @@ -0,0 +1,182 @@ +class_name DVNBalloon extends CanvasLayer +## A basic dialogue balloon for use with Dialogue Manager. + +## The initial label to spit text out from +@export var label:NodePath + +## The action to use for advancing the dialogue +@export var next_action: StringName = &"ui_accept" + +## The action to use to skip typing the dialogue +@export var skip_action: StringName = &"ui_cancel" + +## The dialogue resource +var resource: DialogueResource + +## Temporary game states +var temporary_game_states: Array = [] + +## See if we are waiting for the player +var is_waiting_for_input: bool = false + +## See if we are running a long mutation and should hide the balloon +var will_hide_balloon: bool = false + +## A dictionary to store any ephemeral variables +var locals: Dictionary = {} + +var _locale: String = TranslationServer.get_locale() + +## The current line +var dialogue_line: DialogueLine: + set(value): + if value: + dialogue_line = value + apply_dialogue_line() + else: + # The dialogue has finished so close the balloon + queue_free() + get: + return dialogue_line + +## A cooldown timer for delaying the balloon hide when encountering a mutation. +var mutation_cooldown: Timer = Timer.new() + +## The base balloon anchor +@onready var balloon: Control = %Balloon + +## The label showing the name of the currently speaking character +@onready var character_label: RichTextLabel = %CharacterLabel + +## The label showing the currently spoken dialogue +@onready var dialogue_label: DVNLabel = get_node(label) + +## The menu of responses +@onready var responses_menu: DialogueResponsesMenu = %ResponsesMenu + +#region Label References +#Put label references here +#endregion + + +func _ready() -> void: + balloon.hide() + Engine.get_singleton("DialogueManager").mutated.connect(_on_mutated) + # If the responses menu doesn't have a next action set, use this one + if responses_menu.next_action.is_empty(): + responses_menu.next_action = next_action + + mutation_cooldown.timeout.connect(_on_mutation_cooldown_timeout) + add_child(mutation_cooldown) + +func _unhandled_input(_event: InputEvent) -> void: + # Only the balloon is allowed to handle input while it's showing + get_viewport().set_input_as_handled() + + +func _notification(what: int) -> void: + ## Detect a change of locale and update the current dialogue line to show the new language + if what == NOTIFICATION_TRANSLATION_CHANGED and _locale != TranslationServer.get_locale() and is_instance_valid(dialogue_label): + _locale = TranslationServer.get_locale() + var visible_ratio = dialogue_label.visible_ratio + self.dialogue_line = await resource.get_next_dialogue_line(dialogue_line.id) + if visible_ratio < 1: + dialogue_label.skip_typing() + + +## Start some dialogue +func start(dialogue_resource: DialogueResource, title: String, extra_game_states: Array = []) -> void: + temporary_game_states = [self] + extra_game_states + is_waiting_for_input = false + resource = dialogue_resource + self.dialogue_line = await resource.get_next_dialogue_line(title, temporary_game_states) + + +## Apply any changes to the balloon given a new [DialogueLine]. +func apply_dialogue_line() -> void: + mutation_cooldown.stop() + + is_waiting_for_input = false + balloon.focus_mode = Control.FOCUS_ALL + balloon.grab_focus() + + character_label.visible = not dialogue_line.character.is_empty() + character_label.text = tr(dialogue_line.character, "dialogue") + + dialogue_label.hide() + dialogue_label.dialogue_line = dialogue_line + + responses_menu.hide() + responses_menu.responses = dialogue_line.responses + + # Show our balloon + balloon.show() + will_hide_balloon = false + + dialogue_label.show() + if not dialogue_line.text.is_empty(): + dialogue_label.type_out() + await dialogue_label.finished_typing + + # Wait for input + if dialogue_line.responses.size() > 0: + balloon.focus_mode = Control.FOCUS_NONE + responses_menu.show() + elif dialogue_line.time != "": + var time = dialogue_line.text.length() * 0.02 if dialogue_line.time == "auto" else dialogue_line.time.to_float() + await get_tree().create_timer(time).timeout + next(dialogue_line.next_id) + else: + is_waiting_for_input = true + balloon.focus_mode = Control.FOCUS_ALL + balloon.grab_focus() + + +## Go to the next line +func next(next_id: String) -> void: + self.dialogue_line = await resource.get_next_dialogue_line(next_id, temporary_game_states) + + +#region Signals + + +func _on_mutation_cooldown_timeout() -> void: + if will_hide_balloon: + will_hide_balloon = false + balloon.hide() + + +func _on_mutated(_mutation: Dictionary) -> void: + is_waiting_for_input = false + will_hide_balloon = true + mutation_cooldown.start(0.1) + + +func _on_balloon_gui_input(event: InputEvent) -> void: + # See if we need to skip typing of the dialogue + if dialogue_label.is_typing: + var mouse_was_clicked: bool = event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.is_pressed() + var skip_button_was_pressed: bool = event.is_action_pressed(skip_action) + if mouse_was_clicked or skip_button_was_pressed: + get_viewport().set_input_as_handled() + dialogue_label.skip_typing() + return + + if not is_waiting_for_input: return + if dialogue_line.responses.size() > 0: return + + # When there are no response options the balloon itself is the clickable thing + get_viewport().set_input_as_handled() + + if event is InputEventMouseButton and event.is_pressed() and event.button_index == MOUSE_BUTTON_LEFT: + next(dialogue_line.next_id) + elif event.is_action_pressed(next_action) and get_viewport().gui_get_focus_owner() == balloon: + next(dialogue_line.next_id) + +func _process(delta: float) -> void: + print(dialogue_line.responses.size()) + +func _on_responses_menu_response_selected(response: DialogueResponse) -> void: + next(response.next_id) + +#endregion diff --git a/balloon/dvn_balloon.tscn b/balloon/dvn_balloon.tscn new file mode 100644 index 0000000..bf3f6e0 --- /dev/null +++ b/balloon/dvn_balloon.tscn @@ -0,0 +1,235 @@ +[gd_scene load_steps=78 format=3 uid="uid://kssjsapnseux"] + +[ext_resource type="Script" path="res://dvn/balloon/dvn_balloon.gd" id="1_7pshc"] +[ext_resource type="Script" path="res://dvn/label/dvn_label.gd" id="2_6sj0s"] +[ext_resource type="Script" path="res://addons/dialogue_manager/dialogue_responses_menu.gd" id="3_72ixx"] +[ext_resource type="AudioStream" uid="uid://b5g1o68bedpma" path="res://dvn/test_resources/punchy_2.ogg" id="3_r4ecv"] +[ext_resource type="AudioStream" uid="uid://t3re1rycy7j2" path="res://dvn/test_resources/blabber/ga1.wav" id="4_u35o7"] +[ext_resource type="AudioStream" uid="uid://bpgaqfi7u7lxs" path="res://dvn/test_resources/blabber/far1.wav" id="5_1mx5q"] +[ext_resource type="AudioStream" uid="uid://dxfs35l47g73l" path="res://dvn/test_resources/blabber/pa1.wav" id="5_hqg66"] +[ext_resource type="AudioStream" uid="uid://lj6cmjs2fcoy" path="res://dvn/test_resources/marisese/a.ogg" id="5_s58gb"] +[ext_resource type="AudioStream" uid="uid://b5kfcwr6q6dps" path="res://dvn/test_resources/blabber/fal1.wav" id="6_lo1j6"] +[ext_resource type="AudioStream" uid="uid://hpua870udnef" path="res://dvn/test_resources/marisese/b.ogg" id="6_omx1e"] +[ext_resource type="AudioStream" uid="uid://do4bmxgaj20n" path="res://dvn/test_resources/blabber/sd3.wav" id="6_yc5h0"] +[ext_resource type="AudioStream" uid="uid://cjvp4618k1655" path="res://dvn/test_resources/marisese/c.ogg" id="7_a5omb"] +[ext_resource type="AudioStream" uid="uid://0v1iv2ra8x8w" path="res://dvn/test_resources/blabber/ga2.wav" id="7_kithf"] +[ext_resource type="AudioStream" uid="uid://i5d6kk1knsma" path="res://dvn/test_resources/blabber/za1.wav" id="7_xd30j"] +[ext_resource type="AudioStream" uid="uid://b2wynph473uvs" path="res://dvn/test_resources/blabber/le1.wav" id="8_1sfsk"] +[ext_resource type="AudioStream" uid="uid://mdubpok7ngrq" path="res://dvn/test_resources/marisese/d.ogg" id="8_8yx8w"] +[ext_resource type="AudioStream" uid="uid://dqltsvqf3k6vc" path="res://dvn/test_resources/blabber/ne1'.wav" id="9_gqda4"] +[ext_resource type="AudioStream" uid="uid://b4au507qswa1v" path="res://dvn/test_resources/marisese/e.ogg" id="9_pg2hw"] +[ext_resource type="AudioStream" uid="uid://dfv7i773v1345" path="res://dvn/test_resources/blabber/ni.wav" id="10_8fdhg"] +[ext_resource type="AudioStream" uid="uid://d1osi4yd264ha" path="res://dvn/test_resources/marisese/f.ogg" id="10_jk1b0"] +[ext_resource type="AudioStream" uid="uid://d2tf84enhxeb7" path="res://dvn/test_resources/marisese/g.ogg" id="11_1jvbh"] +[ext_resource type="AudioStream" uid="uid://bg3bavm00pcnk" path="res://dvn/test_resources/blabber/pe1.wav" id="12_7kmd4"] +[ext_resource type="AudioStream" uid="uid://b8bbdmrbv4enj" path="res://dvn/test_resources/marisese/h.ogg" id="12_m0nou"] +[ext_resource type="AudioStream" uid="uid://d3ckkydmnk8gl" path="res://dvn/test_resources/marisese/i.ogg" id="13_33ocx"] +[ext_resource type="AudioStream" uid="uid://sm4230h82f5q" path="res://dvn/test_resources/blabber/pi1.wav" id="13_653r3"] +[ext_resource type="AudioStream" uid="uid://chppepwyeaxo1" path="res://dvn/test_resources/blabber/ri1.wav" id="14_eum43"] +[ext_resource type="AudioStream" uid="uid://cimlinpp0blqe" path="res://dvn/test_resources/marisese/j.ogg" id="14_x3e66"] +[ext_resource type="AudioStream" uid="uid://dalsdbfgokvh8" path="res://dvn/test_resources/blabber/ri2.wav" id="15_2y1bp"] +[ext_resource type="AudioStream" uid="uid://od5mo70vksk" path="res://dvn/test_resources/marisese/k.ogg" id="15_fv67h"] +[ext_resource type="AudioStream" uid="uid://cms646gy24tg1" path="res://dvn/test_resources/marisese/l.ogg" id="16_40n6l"] +[ext_resource type="AudioStream" uid="uid://mwypw3x0tsjd" path="res://dvn/test_resources/blabber/sd1.wav" id="16_wc70t"] +[ext_resource type="AudioStream" uid="uid://g64h12p8xumh" path="res://dvn/test_resources/blabber/sd2.wav" id="17_mf7tw"] +[ext_resource type="AudioStream" uid="uid://drcrhooamcuv4" path="res://dvn/test_resources/marisese/m.ogg" id="17_xvh1l"] +[ext_resource type="AudioStream" uid="uid://bqoygbln7xe5b" path="res://dvn/test_resources/marisese/n.ogg" id="18_6gfu7"] +[ext_resource type="AudioStream" uid="uid://5fmqnqdna8lv" path="res://dvn/test_resources/blabber/sd4.wav" id="19_2bqn5"] +[ext_resource type="AudioStream" uid="uid://nrhmwe1yb04k" path="res://dvn/test_resources/marisese/o.ogg" id="19_gf3wl"] +[ext_resource type="AudioStream" uid="uid://bxjkrlc4vt2kh" path="res://dvn/test_resources/blabber/sd5.wav" id="20_jpywu"] +[ext_resource type="AudioStream" uid="uid://hycxcbqq6i6d" path="res://dvn/test_resources/marisese/p.ogg" id="20_lpylb"] +[ext_resource type="AudioStream" uid="uid://fkdc5nuwwtrv" path="res://dvn/test_resources/marisese/q.ogg" id="21_bummq"] +[ext_resource type="AudioStream" uid="uid://b0ys7cac48mox" path="res://dvn/test_resources/blabber/sd6.wav" id="21_w8351"] +[ext_resource type="AudioStream" uid="uid://i77kull066ki" path="res://dvn/test_resources/blabber/sd7.wav" id="22_7ne0y"] +[ext_resource type="AudioStream" uid="uid://cnw5pe2mew1ns" path="res://dvn/test_resources/marisese/r.ogg" id="22_jokfj"] +[ext_resource type="AudioStream" uid="uid://cx76n171p3cuj" path="res://dvn/test_resources/blabber/sd8.wav" id="23_cfbfm"] +[ext_resource type="AudioStream" uid="uid://dr52n8ld32c3h" path="res://dvn/test_resources/marisese/s.ogg" id="23_gc78o"] +[ext_resource type="AudioStream" uid="uid://cq2ogvp0ojpfn" path="res://dvn/test_resources/blabber/sd9.wav" id="24_5du8q"] +[ext_resource type="AudioStream" uid="uid://loxlrrvh88gx" path="res://dvn/test_resources/marisese/t.ogg" id="24_s0nnq"] +[ext_resource type="AudioStream" uid="uid://cnre5w258b5h8" path="res://dvn/test_resources/blabber/sd10.wav" id="25_kkyvo"] +[ext_resource type="AudioStream" uid="uid://borglhy7pdu7a" path="res://dvn/test_resources/marisese/u.ogg" id="25_vlwqh"] +[ext_resource type="AudioStream" uid="uid://cwgc5q6gkk24m" path="res://dvn/test_resources/marisese/v.ogg" id="26_6e03u"] +[ext_resource type="AudioStream" uid="uid://0hucylbigf3v" path="res://dvn/test_resources/blabber/sd11.wav" id="26_avjdm"] +[ext_resource type="AudioStream" uid="uid://d3d4qd504q88s" path="res://dvn/test_resources/marisese/w.ogg" id="27_5cwqb"] +[ext_resource type="AudioStream" uid="uid://61m5vy2qnxog" path="res://dvn/test_resources/blabber/sd12.wav" id="27_s3tpd"] +[ext_resource type="AudioStream" uid="uid://2yfoybsar237" path="res://dvn/test_resources/marisese/x.ogg" id="28_0kdps"] +[ext_resource type="AudioStream" uid="uid://cirx6t05t8ao0" path="res://dvn/test_resources/blabber/sd13.wav" id="28_qp1sa"] +[ext_resource type="AudioStream" uid="uid://bl6crwxrpbtn1" path="res://dvn/test_resources/marisese/y.ogg" id="29_4buba"] +[ext_resource type="AudioStream" uid="uid://c36rbn6sic5pt" path="res://dvn/test_resources/blabber/sd14.wav" id="29_dtoho"] +[ext_resource type="AudioStream" uid="uid://24xlk8xji84c" path="res://dvn/test_resources/marisese/z.ogg" id="30_445y8"] +[ext_resource type="AudioStream" uid="uid://bpa2mw442i3xc" path="res://dvn/test_resources/blabber/sd15.wav" id="30_n54fv"] +[ext_resource type="AudioStream" uid="uid://cjl1n6g2m36b" path="res://dvn/test_resources/blabber/sd16.wav" id="31_2to4j"] +[ext_resource type="AudioStream" uid="uid://dov7x4duhpcmv" path="res://dvn/test_resources/marisese/null.ogg" id="31_pfilt"] +[ext_resource type="AudioStream" uid="uid://ge3im18rj7ay" path="res://dvn/test_resources/blabber/sd17.wav" id="32_yuu2y"] +[ext_resource type="AudioStream" uid="uid://bhyypbcfh348o" path="res://dvn/test_resources/blabber/sd18.wav" id="33_2gwmx"] +[ext_resource type="AudioStream" uid="uid://gwk6piygd8ui" path="res://dvn/test_resources/blabber/sd19.wav" id="34_gg2cq"] +[ext_resource type="AudioStream" uid="uid://ceq1ke4reramj" path="res://dvn/test_resources/blabber/sd20.wav" id="35_sslpl"] +[ext_resource type="AudioStream" uid="uid://8wjlqeg6b8xx" path="res://dvn/test_resources/blabber/sd21.wav" id="36_l8u4p"] +[ext_resource type="AudioStream" uid="uid://bqfn6evn120or" path="res://dvn/test_resources/blabber/sd22.wav" id="37_1yil4"] +[ext_resource type="AudioStream" uid="uid://i7lo7bm16vff" path="res://dvn/test_resources/blabber/sd23.wav" id="38_b1vdh"] +[ext_resource type="AudioStream" uid="uid://bax606i3nxh7l" path="res://dvn/test_resources/blabber/ss1.wav" id="39_ek6jr"] +[ext_resource type="AudioStream" uid="uid://37cucmolvd3f" path="res://dvn/test_resources/blabber/ta1.wav" id="40_j2irc"] +[ext_resource type="AudioStream" uid="uid://c58ka00u052yv" path="res://dvn/test_resources/blabber/te1.wav" id="41_pj75e"] +[ext_resource type="AudioStream" uid="uid://dcqmpdxusohbq" path="res://dvn/test_resources/blabber/ti1.wav" id="42_tsvub"] +[ext_resource type="AudioStream" uid="uid://dtdt4e3u6nvnv" path="res://dvn/test_resources/blabber/to1.wav" id="43_6my38"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_spyqn"] +bg_color = Color(0, 0, 0, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(0.329412, 0.329412, 0.329412, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ri4m3"] +bg_color = Color(0.121569, 0.121569, 0.121569, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(1, 1, 1, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_e0njw"] +bg_color = Color(0, 0, 0, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +border_color = Color(0.6, 0.6, 0.6, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uy0d5"] +bg_color = Color(0, 0, 0, 1) +border_width_left = 3 +border_width_top = 3 +border_width_right = 3 +border_width_bottom = 3 +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 + +[sub_resource type="Theme" id="Theme_qq3yp"] +default_font_size = 20 +Button/styles/disabled = SubResource("StyleBoxFlat_spyqn") +Button/styles/focus = SubResource("StyleBoxFlat_ri4m3") +Button/styles/hover = SubResource("StyleBoxFlat_e0njw") +Button/styles/normal = SubResource("StyleBoxFlat_e0njw") +MarginContainer/constants/margin_bottom = 15 +MarginContainer/constants/margin_left = 30 +MarginContainer/constants/margin_right = 30 +MarginContainer/constants/margin_top = 15 +Panel/styles/panel = SubResource("StyleBoxFlat_uy0d5") + +[node name="DVNBalloon" type="CanvasLayer"] +layer = 100 +script = ExtResource("1_7pshc") +label = NodePath("Balloon/Panel/Dialogue/VBoxContainer/DVNLabel") + +[node name="Balloon" type="Control" parent="."] +unique_name_in_owner = true +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = SubResource("Theme_qq3yp") + +[node name="Panel" type="Panel" parent="Balloon"] +clip_children = 2 +layout_mode = 1 +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 21.0 +offset_top = -183.0 +offset_right = -19.0 +offset_bottom = -19.0 +grow_horizontal = 2 +grow_vertical = 0 +mouse_filter = 1 + +[node name="Dialogue" type="MarginContainer" parent="Balloon/Panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="Balloon/Panel/Dialogue"] +layout_mode = 2 + +[node name="CharacterLabel" type="RichTextLabel" parent="Balloon/Panel/Dialogue/VBoxContainer"] +unique_name_in_owner = true +modulate = Color(1, 1, 1, 0.501961) +layout_mode = 2 +mouse_filter = 1 +bbcode_enabled = true +text = "Character" +fit_content = true +scroll_active = false + +[node name="DVNLabel" type="RichTextLabel" parent="Balloon/Panel/Dialogue/VBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +mouse_filter = 1 +bbcode_enabled = true +fit_content = true +scroll_active = false +shortcut_keys_enabled = false +meta_underlined = false +hint_underlined = false +deselect_on_focus_loss_enabled = false +visible_characters_behavior = 1 +script = ExtResource("2_6sj0s") +talktone_player_path = NodePath("../../../../../TalktonePlayer") +tone_type = 5 +beep_noise = ExtResource("3_r4ecv") +blabber_noises = Array[Resource]([ExtResource("6_lo1j6"), ExtResource("5_1mx5q"), ExtResource("4_u35o7"), ExtResource("7_kithf"), ExtResource("8_1sfsk"), ExtResource("9_gqda4"), ExtResource("10_8fdhg"), ExtResource("5_hqg66"), ExtResource("12_7kmd4"), ExtResource("13_653r3"), ExtResource("14_eum43"), ExtResource("15_2y1bp"), ExtResource("16_wc70t"), ExtResource("17_mf7tw"), ExtResource("6_yc5h0"), ExtResource("19_2bqn5"), ExtResource("20_jpywu"), ExtResource("21_w8351"), ExtResource("22_7ne0y"), ExtResource("23_cfbfm"), ExtResource("24_5du8q"), ExtResource("25_kkyvo"), ExtResource("26_avjdm"), ExtResource("27_s3tpd"), ExtResource("28_qp1sa"), ExtResource("29_dtoho"), ExtResource("30_n54fv"), ExtResource("31_2to4j"), ExtResource("32_yuu2y"), ExtResource("33_2gwmx"), ExtResource("34_gg2cq"), ExtResource("35_sslpl"), ExtResource("36_l8u4p"), ExtResource("37_1yil4"), ExtResource("38_b1vdh"), ExtResource("39_ek6jr"), ExtResource("40_j2irc"), ExtResource("41_pj75e"), ExtResource("42_tsvub"), ExtResource("43_6my38"), ExtResource("7_xd30j")]) +marisese_noises = Array[Resource]([ExtResource("5_s58gb"), ExtResource("6_omx1e"), ExtResource("7_a5omb"), ExtResource("8_8yx8w"), ExtResource("9_pg2hw"), ExtResource("10_jk1b0"), ExtResource("11_1jvbh"), ExtResource("12_m0nou"), ExtResource("13_33ocx"), ExtResource("14_x3e66"), ExtResource("15_fv67h"), ExtResource("16_40n6l"), ExtResource("17_xvh1l"), ExtResource("18_6gfu7"), ExtResource("19_gf3wl"), ExtResource("20_lpylb"), ExtResource("21_bummq"), ExtResource("22_jokfj"), ExtResource("23_gc78o"), ExtResource("24_s0nnq"), ExtResource("25_vlwqh"), ExtResource("26_6e03u"), ExtResource("27_5cwqb"), ExtResource("28_0kdps"), ExtResource("29_4buba"), ExtResource("30_445y8"), ExtResource("31_pfilt")]) + +[node name="Responses" type="MarginContainer" parent="Balloon"] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -147.0 +offset_top = -558.0 +offset_right = 494.0 +offset_bottom = -154.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="ResponsesMenu" type="VBoxContainer" parent="Balloon/Responses" node_paths=PackedStringArray("response_template")] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 8 +theme_override_constants/separation = 2 +script = ExtResource("3_72ixx") +response_template = NodePath("ResponseExample") + +[node name="ResponseExample" type="Button" parent="Balloon/Responses/ResponsesMenu"] +layout_mode = 2 +text = "Response example" + +[node name="TalktonePlayer" type="AudioStreamPlayer" parent="."] +bus = &"VOX" + +[connection signal="gui_input" from="Balloon" to="." method="_on_balloon_gui_input"] +[connection signal="response_selected" from="Balloon/Responses/ResponsesMenu" to="." method="_on_responses_menu_response_selected"]