Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,6 @@
extends CanvasLayer
## FOR TESTING PURPOSES
func _ready():
add_to_group('dialogic_main_node')

View file

@ -0,0 +1,467 @@
[gd_scene load_steps=30 format=3 uid="uid://btx7jmmry0ots"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/DialogicDefaultScene.gd" id="1"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_dialog_text.gd" id="2"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_name_label.gd" id="3"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Choice/node_choice_button.gd" id="4"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_position.gd" id="5"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Background/node_background_holder.gd" id="5_uvb2c"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_holder.gd" id="6"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Audio/node_music_player.gd" id="8"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Audio/node_sound_player.gd" id="9"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_type_sound.gd" id="10"]
[ext_resource type="AudioStream" uid="uid://bcj247fr4724u" path="res://addons/dialogic/Example Assets/sound-effects/typing4.wav" id="11"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Style/node_style.gd" id="12"]
[ext_resource type="AudioStream" uid="uid://b0h804rt2qkra" path="res://addons/dialogic/Example Assets/sound-effects/typing5.wav" id="13"]
[ext_resource type="AudioStream" uid="uid://daebxvtgwbw1n" path="res://addons/dialogic/Example Assets/sound-effects/typing1.wav" id="14"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_input_handler.gd" id="17"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Choice/node_button_sound.gd" id="18"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_next_indicator.gd" id="20_ljcq2"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/ExampleGlossaryPopup.gd" id="20_vmnp2"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Voice/node_voice_player.gd" id="20_x1o37"]
[ext_resource type="PackedScene" uid="uid://d0rj8iawfra65" path="res://addons/dialogic/Example Assets/example-scenes/ExampleHistoryScene.tscn" id="22_854kg"]
[ext_resource type="Script" path="res://addons/dialogic/Events/TextInput/node_text_input.gd" id="22_ltkcf"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/HideWithChild.gd" id="23"]
[ext_resource type="FontFile" uid="uid://2qv66mtjb25r" path="res://addons/dialogic/Example Assets/Fonts/Roboto-Regular.ttf" id="23_gyqve"]
[ext_resource type="FontFile" uid="uid://bomh4hpbfqpen" path="res://addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf" id="24_aa4pl"]
[ext_resource type="FontFile" uid="uid://d223qsr1bjod3" path="res://addons/dialogic/Example Assets/Fonts/Roboto-Italic.ttf" id="25_wt3bc"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wpkyg"]
bg_color = Color(0, 0, 0, 0.752941)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
expand_margin_left = 5.0
expand_margin_top = 5.0
expand_margin_right = 5.0
expand_margin_bottom = 5.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q3vpc"]
bg_color = Color(0, 0, 0, 0.752941)
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
expand_margin_left = 15.0
expand_margin_top = 15.0
expand_margin_right = 15.0
expand_margin_bottom = 15.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a3cyk"]
bg_color = Color(0.12549, 0.12549, 0.12549, 1)
border_width_left = 2
border_width_top = 4
border_width_right = 4
border_width_bottom = 2
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
expand_margin_left = 5.0
expand_margin_top = 5.0
expand_margin_right = 5.0
expand_margin_bottom = 5.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nnmvp"]
content_margin_left = 10.0
content_margin_top = 10.0
content_margin_right = 10.0
content_margin_bottom = 10.0
bg_color = Color(0.6, 0.576471, 0.54902, 0.956863)
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color(0.733333, 0.670588, 0.627451, 1)
border_blend = true
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_color = Color(0.823529, 0.803922, 0.756863, 1)
shadow_size = 5
[node name="DefaultDialogNode" type="CanvasLayer"]
script = ExtResource("1")
[node name="DialogicInputHandler" type="Node" parent="."]
script = ExtResource("17")
[node name="DialogicNode_SoundPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource("9")
[node name="DialogicNode_MusicPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource("8")
[node name="DialogicNode_BackgroundHolder" type="CanvasLayer" parent="."]
layer = -1
script = ExtResource("5_uvb2c")
[node name="DialogicNode_PortraitHolder" type="CanvasLayer" parent="."]
layer = 0
script = ExtResource("6")
[node name="PortraitPosition1" type="Marker2D" parent="."]
position = Vector2(106, 604)
script = ExtResource("5")
position_index = 1
[node name="PortraitPosition2" type="Marker2D" parent="."]
position = Vector2(302, 601)
script = ExtResource("5")
position_index = 2
[node name="PortraitPosition3" type="Marker2D" parent="."]
position = Vector2(497, 603)
script = ExtResource("5")
position_index = 3
[node name="PortraitPosition4" type="Marker2D" parent="."]
position = Vector2(683, 603)
script = ExtResource("5")
position_index = 4
[node name="PortraitPosition5" type="Marker2D" parent="."]
position = Vector2(887, 605)
script = ExtResource("5")
position_index = 5
[node name="DefaultStyle" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("12")
[node name="Choices" type="VBoxContainer" parent="DefaultStyle"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -115.0
offset_top = -103.0
offset_right = 115.0
offset_bottom = 103.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
metadata/_edit_layout_mode = 1
[node name="DialogicNode_ChoiceButton1" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton2" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton3" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton4" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton5" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton6" type="Button" parent="DefaultStyle/Choices"]
layout_mode = 2
text = "Some text"
script = ExtResource("4")
[node name="DialogicNode_ButtonSound" type="AudioStreamPlayer" parent="DefaultStyle/Choices"]
script = ExtResource("18")
sound_pressed = ExtResource("14")
sound_hover = ExtResource("11")
sound_focus = ExtResource("13")
[node name="PanelContainer2" type="PanelContainer" parent="DefaultStyle"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -276.0
offset_top = -190.0
offset_right = -209.0
offset_bottom = -160.0
grow_horizontal = 2
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_wpkyg")
script = ExtResource("23")
metadata/_edit_layout_mode = 1
metadata/_edit_use_custom_anchors = true
metadata/_edit_group_ = true
[node name="DialogicNode_NameLabel" type="Label" parent="DefaultStyle/PanelContainer2"]
layout_mode = 2
text = "Name"
script = ExtResource("3")
[node name="PanelContainer" type="PanelContainer" parent="DefaultStyle"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -266.0
offset_top = -136.0
offset_right = 286.0
offset_bottom = -27.0
grow_horizontal = 2
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_q3vpc")
metadata/_edit_layout_mode = 1
[node name="DialogicNode_DialogText" type="RichTextLabel" parent="DefaultStyle/PanelContainer"]
layout_mode = 2
bbcode_enabled = true
text = "Some default text"
script = ExtResource("2")
[node name="DialogicNode_TypeSounds" type="AudioStreamPlayer" parent="DefaultStyle/PanelContainer/DialogicNode_DialogText"]
script = ExtResource("10")
sounds = []
play_every_character = 0
[node name="DNextIndicator" type="Control" parent="DefaultStyle/PanelContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
script = ExtResource("20_ljcq2")
show_on_questions = true
metadata/_edit_layout_mode = 1
[node name="DialogicNode_TextInput" type="Control" parent="DefaultStyle"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -210.0
offset_top = -50.0
offset_right = 210.0
offset_bottom = 50.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("22_ltkcf")
input_line_edit = NodePath("PanelContainer/VBoxContainer/InputField")
text_label = NodePath("PanelContainer/VBoxContainer/TextLabel")
confirmation_button = NodePath("PanelContainer/VBoxContainer/ConfirmationButton")
metadata/_edit_layout_mode = 1
[node name="PanelContainer" type="PanelContainer" parent="DefaultStyle/DialogicNode_TextInput"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_q3vpc")
[node name="VBoxContainer" type="VBoxContainer" parent="DefaultStyle/DialogicNode_TextInput/PanelContainer"]
layout_mode = 2
[node name="TextLabel" type="Label" parent="DefaultStyle/DialogicNode_TextInput/PanelContainer/VBoxContainer"]
layout_mode = 2
text = "Please enter some text:"
autowrap_mode = 3
[node name="InputField" type="LineEdit" parent="DefaultStyle/DialogicNode_TextInput/PanelContainer/VBoxContainer"]
layout_mode = 2
[node name="ConfirmationButton" type="Button" parent="DefaultStyle/DialogicNode_TextInput/PanelContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 8
text = "Confirm"
[node name="Glossary" type="Control" parent="DefaultStyle"]
layout_mode = 1
anchors_preset = 0
script = ExtResource("20_vmnp2")
[node name="Panel" type="PanelContainer" parent="DefaultStyle/Glossary"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -99.0
offset_top = -115.0
offset_right = 104.0
offset_bottom = -34.0
grow_horizontal = 2
grow_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_a3cyk")
metadata/_edit_use_custom_anchors = true
metadata/_edit_layout_mode = 1
[node name="VBox" type="VBoxContainer" parent="DefaultStyle/Glossary/Panel"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="Title" type="Label" parent="DefaultStyle/Glossary/Panel/VBox"]
layout_mode = 2
text = "MyGlossaryEntry"
[node name="HSeparator" type="HSeparator" parent="DefaultStyle/Glossary/Panel/VBox"]
layout_mode = 2
[node name="Text" type="RichTextLabel" parent="DefaultStyle/Glossary/Panel/VBox"]
layout_mode = 2
bbcode_enabled = true
text = "Some text"
fit_content_height = true
[node name="Extra" type="RichTextLabel" parent="DefaultStyle/Glossary/Panel/VBox"]
layout_mode = 2
theme_override_colors/default_color = Color(1, 1, 1, 0.584314)
theme_override_font_sizes/normal_font_size = 15
bbcode_enabled = true
text = "[right]Wow, some text!"
fit_content_height = true
[node name="Control" type="Control" parent="DefaultStyle/Glossary/Panel"]
show_behind_parent = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
[node name="PanelContainer" type="PanelContainer" parent="DefaultStyle/Glossary/Panel/Control"]
layout_mode = 0
offset_left = -0.999999
offset_top = -14.0
offset_right = 19.0
offset_bottom = 6.0
rotation = 0.75799
size_flags_horizontal = 4
size_flags_vertical = 8
theme_override_styles/panel = SubResource("StyleBoxFlat_a3cyk")
[node name="SpecialStyle" type="Control" parent="."]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("12")
style_name = "Special"
[node name="Choices" type="VBoxContainer" parent="SpecialStyle"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -208.0
offset_top = -276.0
offset_right = -27.0
offset_bottom = -30.0
grow_horizontal = 0
grow_vertical = 0
alignment = 2
metadata/_edit_layout_mode = 1
[node name="DialogicNode_ChoiceButton1" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton2" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton3" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton4" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton5" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="DialogicNode_ChoiceButton6" type="Button" parent="SpecialStyle/Choices"]
layout_mode = 2
size_flags_horizontal = 8
text = "Text"
script = ExtResource("4")
[node name="PanelContainer" type="PanelContainer" parent="SpecialStyle"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -204.0
offset_top = 26.0
offset_right = 202.0
offset_bottom = 95.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_nnmvp")
metadata/_edit_layout_mode = 1
[node name="MarginContainer" type="MarginContainer" parent="SpecialStyle/PanelContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="SpecialStyle/PanelContainer/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 0
alignment = 1
[node name="DialogicNode_NameLabel" type="Label" parent="SpecialStyle/PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Name"
horizontal_alignment = 1
script = ExtResource("3")
use_character_color = false
[node name="DialogicNode_DialogText" type="RichTextLabel" parent="SpecialStyle/PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Some default text"
fit_content_height = true
script = ExtResource("2")
Align = 1
[node name="ExampleHistoryScene" parent="." instance=ExtResource("22_854kg")]
history_font_normal = ExtResource("23_gyqve")
history_font_bold = ExtResource("24_aa4pl")
history_font_italics = ExtResource("25_wt3bc")
metadata/_edit_lock_ = true
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
script = ExtResource("20_x1o37")
[connection signal="meta_hover_ended" from="DefaultStyle/PanelContainer/DialogicNode_DialogText" to="DefaultStyle/Glossary" method="_on_dialogic_display_dialog_text_meta_hover_ended"]
[connection signal="meta_hover_started" from="DefaultStyle/PanelContainer/DialogicNode_DialogText" to="DefaultStyle/Glossary" method="_on_dialogic_display_dialog_text_meta_hover_started"]

View file

@ -0,0 +1,21 @@
extends Control
func _ready() -> void:
hide()
func _process(delta) -> void:
if visible:
global_position = get_global_mouse_position()
func _on_dialogic_display_dialog_text_meta_hover_started(meta:String) -> void:
var info :Dictionary = Dialogic.Glossary.get_entry(meta)
if info:
show()
$Panel/VBox/Title.text = info.get('title', '')
$Panel/VBox/Text.text = info.get('text', '')
$Panel/VBox/Extra.text = '[right]'+info.get('extra', '')
modulate = info.get('color', Color.WHITE)#.darkened(0.5)
global_position = get_global_mouse_position()
func _on_dialogic_display_dialog_text_meta_hover_ended(meta:String) -> void:
hide()

View file

@ -0,0 +1,23 @@
extends MarginContainer
# Called when the node enters the scene tree for the first time.
func _ready():
var history_root = find_parent("ExampleHistoryScene")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func prepare_texbox(history_root:Node) -> void:
%TextBox.add_theme_font_override("normal_font", history_root.history_font_normal)
%TextBox.add_theme_font_override("bold_font", history_root.history_font_bold)
%TextBox.add_theme_font_override("italics_font", history_root.history_font_italics)
%TextBox.add_theme_font_size_override("normal_font_size", history_root.history_font_size)
%TextBox.add_theme_font_size_override("bold_font_size", history_root.history_font_size)
%TextBox.add_theme_font_size_override("italics_font_size", history_root.history_font_size)
func set_text(text: String) -> void:
%TextBox.text = text

View file

@ -0,0 +1,44 @@
[gd_scene load_steps=3 format=3 uid="uid://d3qjtdsyg3if5"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/ExampleHistoryItem.gd" id="1_dgoja"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_upgjp"]
bg_color = Color(0.317647, 0.317647, 0.317647, 1)
[node name="ExampleHistoryItem" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 0
script = ExtResource("1_dgoja")
[node name="PanelContainer" type="PanelContainer" parent="."]
offset_left = 15.0
offset_top = 15.0
offset_right = 1665.0
offset_bottom = 1050.0
theme_override_styles/panel = SubResource("StyleBoxFlat_upgjp")
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
offset_right = 1650.0
offset_bottom = 1035.0
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="TextBox" type="RichTextLabel" parent="PanelContainer/MarginContainer"]
unique_name_in_owner = true
offset_left = 10.0
offset_top = 10.0
offset_right = 1640.0
offset_bottom = 1025.0
bbcode_enabled = true
text = "Example text"
fit_content_height = true

View file

@ -0,0 +1,205 @@
extends VBoxContainer
#Example scene for viewing the History
#Implements all of the visual options from 1.x History mode
@export var show_open_button: bool = true
@export var show_close_button: bool = true
@export var show_all_choices: bool = true
@export var show_selected_choice: bool = true
@export var show_character_joins: bool = true
@export var show_character_leaves: bool = true
@export var scroll_to_bottom: bool = true
@export var show_name_colors: bool = true
@export var oldest_items_first: bool = true
@export var line_break_after_names: bool
@export var name_delimeter: String = ": "
@export var history_font_size: int
@export var history_font_normal: Font
@export var history_font_bold: Font
@export var history_font_italics: Font
var text_node: MarginContainer
var last_history_index: int
var last_history_count: int
var scroll_to_bottom_flag: bool = false
# Called when the node enters the scene tree for the first time.
func _ready():
if Dialogic.has_subsystem('History'):
text_node = load('res://addons/dialogic/Example Assets/example-scenes/ExampleHistoryItem.tscn').instantiate()
$ShowHistory.visible = show_open_button
else:
self.visible = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if scroll_to_bottom_flag:
await get_tree().process_frame
%HistoryBox.ensure_control_visible(%HistoryLog.get_children()[-1])
scroll_to_bottom_flag = false
func _on_show_history_pressed():
show_history()
func show_history() -> void:
#Start with a quick check so it doesn't rebuild if history's not been changed
if (last_history_index != Dialogic.History.full_history[0]['index']) || (last_history_count != Dialogic.History.full_history.size()):
last_history_index = Dialogic.History.full_history[0]['index']
last_history_count = Dialogic.History.full_history.size()
for index in Dialogic.History.full_history.size():
var item = Dialogic.History.full_history[index]
if item['event_type'] == "Text":
var history_item_string:String = ""
var new_node = text_node.duplicate()
new_node.prepare_texbox(self)
if item['event_object'].character != null:
var character_name = ""
if Dialogic.has_subsystem('VAR'):
character_name += Dialogic.VAR.parse_variables(item['event_object'].character.display_name)
else:
character_name += item['event_object'].character.display_name
if show_name_colors:
character_name = "[color=#" + item['event_object'].character.color.to_html(false) + "]" + character_name + "[/color]"
history_item_string += character_name
history_item_string += name_delimeter
if line_break_after_names:
history_item_string += "\n"
var final_text :String = item['event_object'].get_property_translated('text')
if Dialogic.has_subsystem('VAR'):
final_text = Dialogic.VAR.parse_variables(final_text)
if Dialogic.has_subsystem('Glossary'):
final_text = Dialogic.Glossary.parse_glossary(final_text)
history_item_string += Dialogic.Text.color_names(final_text)
if show_name_colors:
history_item_string = Dialogic.Text.color_names(history_item_string)
new_node.set_text(history_item_string)
%HistoryLog.add_child(new_node)
if oldest_items_first:
%HistoryLog.move_child(new_node,0)
if item['event_type'] == "Character" && (show_character_joins || show_character_leaves):
var history_item_string:String = "[i]"
var new_node = text_node.duplicate()
new_node.prepare_texbox(self)
if !item['event_object'].leave_all:
var character_name = ""
if Dialogic.has_subsystem('VAR'):
character_name += Dialogic.VAR.parse_variables(item['event_object'].character.display_name)
else:
character_name += item['event_object'].character.display_name
if show_name_colors:
history_item_string += "[color=#" + item['event_object'].character.color.to_html(false) + "]" + character_name + "[/color]"
else:
history_item_string += character_name
else:
history_item_string += "Everyone"
if item['event_object'].action_type == DialogicCharacterEvent.ActionTypes.Join && show_character_joins:
history_item_string += " has arrived[/i]"
if item['event_object'].action_type == DialogicCharacterEvent.ActionTypes.Leave && show_character_leaves:
history_item_string += " has left[/i]"
new_node.set_text(history_item_string)
%HistoryLog.add_child(new_node)
if oldest_items_first:
%HistoryLog.move_child(new_node,0)
if Dialogic.has_subsystem('Choices') && item['event_type'] == "Choice" && (show_all_choices || show_selected_choice):
var history_item_string:String = ""
var new_node = text_node.duplicate()
new_node.prepare_texbox(self)
if show_selected_choice && !show_all_choices:
history_item_string += "[ul][b]" + item['event_object'].get_property_translated('text') + "[/b][/ul]"
else:
if index + 1 < Dialogic.History.full_history.size():
#Here be shenanigans
var choice_starting_event = Dialogic.History.full_history[index + 1]
var working_timeline: DialogicTimeline = null
if choice_starting_event['timeline'] == Dialogic.current_timeline.resource_path:
working_timeline = Dialogic.current_timeline
else:
working_timeline = Dialogic.preload_timeline(choice_starting_event['timeline'])
var search_line = choice_starting_event['index'] + 1
var search_depth = 0
while search_depth > -1:
if working_timeline.events[search_line].event_name == "Choice":
search_depth += 1
if search_depth == 1:
if show_selected_choice && search_line == item['index']:
history_item_string += "•[b]" + working_timeline.events[search_line].get_property_translated('text') + "[/b]\n"
else:
history_item_string += "•" + working_timeline.events[search_line].get_property_translated('text') + "\n"
else:
if search_depth > 0:
if working_timeline.events[search_line].event_name == "End Branch":
search_depth -= 1
else:
search_depth -= 1
search_line += 1
else:
history_item_string += "•" + item['event_object'].get_property_translated('text')
new_node.set_text(history_item_string)
%HistoryLog.add_child(new_node)
if oldest_items_first:
%HistoryLog.move_child(new_node,0)
new_node.set_text(history_item_string)
%HistoryLog.add_child(new_node)
if oldest_items_first:
%HistoryLog.move_child(new_node,0)
if scroll_to_bottom:
scroll_to_bottom_flag = true
$ShowHistory.visible = false
$HideHistory.visible = show_close_button
%HistoryBox.visible = true
func _on_hide_history_pressed():
%HistoryBox.visible = false
$HideHistory.visible = false
$ShowHistory.visible = show_open_button

View file

@ -0,0 +1,61 @@
[gd_scene load_steps=3 format=3 uid="uid://d0rj8iawfra65"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/ExampleHistoryScene.gd" id="1_o5tfq"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1hdvb"]
bg_color = Color(0, 0, 0, 0.776471)
border_width_left = 20
border_width_right = 20
border_width_bottom = 20
border_color = Color(0.8, 0.8, 0.8, 0)
[node name="ExampleHistoryScene" type="VBoxContainer"]
layout_direction = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 2
script = ExtResource("1_o5tfq")
[node name="ShowHistory" type="Button" parent="."]
offset_left = 808.0
offset_right = 872.0
offset_bottom = 31.0
size_flags_horizontal = 4
size_flags_vertical = 4
text = "History"
[node name="HideHistory" type="Button" parent="."]
visible = false
offset_left = 809.0
offset_top = 35.0
offset_right = 870.0
offset_bottom = 66.0
size_flags_horizontal = 4
size_flags_vertical = 4
text = "Return"
[node name="HistoryBox" type="ScrollContainer" parent="."]
unique_name_in_owner = true
visible = false
offset_top = 70.0
offset_right = 1680.0
offset_bottom = 1050.0
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_1hdvb")
[node name="HistoryLog" type="VBoxContainer" parent="HistoryBox"]
unique_name_in_owner = true
layout_direction = 1
offset_left = 20.0
offset_right = 1660.0
offset_bottom = 960.0
size_flags_horizontal = 3
size_flags_vertical = 3
[connection signal="pressed" from="ShowHistory" to="." method="_on_show_history_pressed"]
[connection signal="pressed" from="HideHistory" to="." method="_on_hide_history_pressed"]

View file

@ -0,0 +1,34 @@
extends Control
enum sizing_modes {ADJUST_TO_TEXT_LENGTH, KEEP_FIXED}
@export_enum(sizing_modes) var sizing_mode:int = sizing_modes.ADJUST_TO_TEXT_LENGTH
@onready var max_width = get_viewport().size.x/2
@onready var max_lines = 5
func _on_DialogText_continued_revealing_text(new_character = ""):
var font = $DialogText.get_font("normal_font")
var line_height = font.get_height()
var longest_line_len = 0
var lines = 0
for line in $DialogText.text.substr(0, $DialogText.visible_characters).split("\n"):
longest_line_len = font.get_string_size(line).x if font.get_string_size(line).x > longest_line_len else longest_line_len
if font.get_string_size(line).x > max_width-60:
lines += ceil(font.get_string_size(line).x/(max_width-60))-1
lines += 1
# because there is a margin and a number inside the stylebox (especially to the left) this needs to be added
longest_line_len += 100
if sizing_mode == sizing_modes.ADJUST_TO_TEXT_LENGTH:
custom_minimum_size.x = min(max_width, longest_line_len)
# a margin has to be added vertically as well because of the stylebox
custom_minimum_size.y = line_height*min(lines, max_lines)+40
# Enable Scroll bar when more then max lines
$DialogText.scroll_active = lines > max_lines
elif lines*line_height+40 > $DialogText.size.y:
$DialogText.scroll_active = true
if $DialogText.scroll_active:
$DialogText.get_v_scroll().rect_position.x = $DialogText.size.x-20
$DialogText.get_v_scroll().margin_right = -20
$DialogText.scroll_to_line(lines-max_lines)

View file

@ -0,0 +1,7 @@
extends Control
func _ready():
get_child(0).visibility_changed.connect(visiblity_changed)
func visiblity_changed():
visible = get_child(0).visible

View file

@ -0,0 +1,270 @@
[gd_scene load_steps=19 format=3]
[ext_resource type="DynamicFontData" path="res://addons/dialogic/Example Assets/fonts/Roboto-Regular.ttf" id="1"]
[ext_resource type="DynamicFontData" path="res://addons/dialogic/Example Assets/fonts/Roboto-Bold.ttf" id="2"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_dialog_text.gd" id="3"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_position.gd" id="4"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_holder.gd" id="5"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_name_label.gd" id="6"]
[ext_resource type="Texture" path="res://addons/dialogic/Example Assets/backgrounds/background.webp" id="7"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_input_handler.gd" id="8"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Choice/node_choice_button.gd" id="9"]
[ext_resource type="DynamicFontData" path="res://addons/dialogic/Example Assets/fonts/Roboto-Italic.ttf" id="10"]
[sub_resource type="StyleBoxFlat" id=4]
content_margin_left = 20.0
content_margin_right = 20.0
content_margin_top = 4.0
content_margin_bottom = 4.0
bg_color = Color( 0.117647, 0.0862745, 0.188235, 1 )
skew = Vector2( -0.245, 0 )
shadow_color = Color( 0.501961, 0.501961, 0.501961, 0.298039 )
shadow_size = 5
[sub_resource type="DynamicFont" id=1]
size = 20
font_data = ExtResource( 2 )
[sub_resource type="DynamicFont" id=2]
size = 18
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=3]
font_data = ExtResource( 10 )
[sub_resource type="StyleBoxFlat" id=5]
content_margin_left = 4.0
content_margin_right = 4.0
content_margin_top = 4.0
content_margin_bottom = 4.0
bg_color = Color( 0.235294, 0.203922, 0.341176, 1 )
skew = Vector2( -0.051, 0 )
[sub_resource type="StyleBoxFlat" id=6]
content_margin_left = 4.0
content_margin_right = 4.0
content_margin_top = 4.0
content_margin_bottom = 4.0
bg_color = Color( 0.14902, 0.12549, 0.227451, 1 )
draw_center = false
skew = Vector2( -0.051, 0 )
border_width_right = 2
border_width_bottom = 2
corner_radius_bottom_right = 3
expand_margin_right = 2.0
expand_margin_bottom = 2.0
[sub_resource type="StyleBoxFlat" id=7]
content_margin_left = 4.0
content_margin_right = 4.0
content_margin_top = 4.0
content_margin_bottom = 4.0
bg_color = Color( 0.262745, 0.25098, 0.305882, 1 )
skew = Vector2( -0.051, 0 )
[sub_resource type="StyleBoxFlat" id=8]
content_margin_left = 4.0
content_margin_right = 4.0
content_margin_top = 4.0
content_margin_bottom = 4.0
bg_color = Color( 0.14902, 0.12549, 0.227451, 1 )
skew = Vector2( -0.051, 0 )
[node name="RPG_ExampleNode" type="CanvasLayer"]
[node name="DialogicInputHandler" type="Node" parent="."]
script = ExtResource( 8 )
[node name="DialogicNode_PortraitHolder" type="CanvasLayer" parent="."]
layer = 2
script = ExtResource( 5 )
[node name="DialogicNode_PortraitPosition" type="Position2D" parent="."]
position = Vector2( 163, 601 )
script = ExtResource( 4 )
[node name="TextureRect" type="TextureRect" parent="."]
self_modulate = Color( 0.0705882, 0.0745098, 0.196078, 0.819608 )
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -38.0
margin_top = -145.0
margin_right = 28.0
margin_bottom = 59.0
texture = ExtResource( 7 )
expand = true
[node name="TextureRect2" type="PanelContainer" parent="TextureRect"]
anchor_top = 1.0
anchor_bottom = 1.0
margin_left = 342.0
margin_top = -224.0
margin_right = 530.0
margin_bottom = -188.0
custom_styles/panel = SubResource( 4 )
[node name="DialogicNode_NameLabel" type="Label" parent="TextureRect/TextureRect2"]
margin_left = 20.0
margin_top = 6.0
margin_right = 168.0
margin_bottom = 30.0
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 1 )
text = "Name"
script = ExtResource( 6 )
[node name="DialogicNode_DialogText" type="RichTextLabel" parent="TextureRect"]
margin_left = 351.0
margin_top = 31.0
margin_right = 1015.0
margin_bottom = 123.0
size_flags_vertical = 3
custom_colors/default_color = Color( 0.996078, 0.996078, 0.996078, 1 )
custom_fonts/normal_font = SubResource( 2 )
bbcode_enabled = true
bbcode_text = "Some text"
text = "Some text"
fit_content_height = true
script = ExtResource( 3 )
[node name="VBoxContainer2" type="VBoxContainer" parent="TextureRect"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -314.5
margin_top = -179.177
margin_right = -49.5001
margin_bottom = 2.82298
grow_horizontal = 0
grow_vertical = 0
rect_rotation = 0.940045
rect_pivot_offset = Vector2( 294.705, 89.0195 )
alignment = 2
[node name="DialogicNode_ChoiceButton" type="Button" parent="TextureRect/VBoxContainer2"]
margin_right = 265.0
margin_bottom = 27.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton6")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton2")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
[node name="DialogicNode_ChoiceButton2" type="Button" parent="TextureRect/VBoxContainer2"]
margin_top = 31.0
margin_right = 265.0
margin_bottom = 58.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton3")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
__meta__ = {
"_editor_description_": ""
}
[node name="DialogicNode_ChoiceButton3" type="Button" parent="TextureRect/VBoxContainer2"]
margin_top = 62.0
margin_right = 265.0
margin_bottom = 89.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton2")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton4")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
__meta__ = {
"_editor_description_": ""
}
[node name="DialogicNode_ChoiceButton4" type="Button" parent="TextureRect/VBoxContainer2"]
margin_top = 93.0
margin_right = 265.0
margin_bottom = 120.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton3")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton5")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
__meta__ = {
"_editor_description_": ""
}
[node name="DialogicNode_ChoiceButton5" type="Button" parent="TextureRect/VBoxContainer2"]
margin_top = 124.0
margin_right = 265.0
margin_bottom = 151.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton4")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton6")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
__meta__ = {
"_editor_description_": ""
}
[node name="DialogicNode_ChoiceButton6" type="Button" parent="TextureRect/VBoxContainer2"]
margin_top = 155.0
margin_right = 265.0
margin_bottom = 182.0
focus_neighbour_top = NodePath("../DialogicNode_ChoiceButton5")
focus_neighbour_bottom = NodePath("../DialogicNode_ChoiceButton")
custom_colors/font_color_disabled = Color( 0.654902, 0.654902, 0.654902, 1 )
custom_colors/font_color_focus = Color( 0.917647, 0.917647, 0.917647, 1 )
custom_colors/font_color = Color( 0.905882, 0.905882, 0.905882, 1 )
custom_colors/font_color_hover = Color( 0.886275, 0.815686, 0.952941, 1 )
custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
custom_fonts/font = SubResource( 3 )
custom_styles/hover = SubResource( 5 )
custom_styles/focus = SubResource( 6 )
custom_styles/disabled = SubResource( 7 )
custom_styles/normal = SubResource( 8 )
text = "Text"
script = ExtResource( 9 )
__meta__ = {
"_editor_description_": ""
}

View file

@ -0,0 +1,104 @@
[gd_scene load_steps=8 format=3]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_dialog_text.gd" id="3"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_position.gd" id="4"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Character/node_portrait_holder.gd" id="5"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_name_label.gd" id="6"]
[ext_resource type="Texture2D" uid="uid://suqebxc71s24" path="res://addons/dialogic/Example Assets/backgrounds/rpg_box.webp" id="7"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_input_handler.gd" id="8"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Choice/node_choice_button.gd" id="9"]
[node name="RPG_ExampleNode" type="CanvasLayer"]
layer = 3
[node name="DialogicInputHandler" type="Node" parent="."]
script = ExtResource("8")
[node name="DialogicNode_PortraitHolder" type="CanvasLayer" parent="."]
layer = 2
script = ExtResource("5")
[node name="TextureRect" type="TextureRect" parent="."]
self_modulate = Color(0.435294, 0.32549, 0.168627, 1)
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
texture = ExtResource("7")
[node name="DialogicNode_PortraitPosition" type="Position2D" parent="TextureRect"]
position = Vector2(69, 130)
script = ExtResource("4")
[node name="CanvasLayer" type="CanvasLayer" parent="TextureRect"]
[node name="ColorRect" type="ColorRect" parent="TextureRect/CanvasLayer"]
color = Color(0.121569, 0.105882, 0.0784314, 1)
[node name="VBoxContainer" type="VBoxContainer" parent="TextureRect"]
anchor_right = 1.0
anchor_bottom = 1.0
[node name="DialogicNode_NameLabel" type="Label" parent="TextureRect/VBoxContainer"]
offset_right = 1200.0
offset_bottom = 26.0
text = "Name"
script = ExtResource("6")
[node name="DialogicNode_DialogText" type="RichTextLabel" parent="TextureRect/VBoxContainer"]
offset_top = 30.0
offset_right = 1200.0
offset_bottom = 234.0
size_flags_vertical = 3
bbcode_enabled = true
text = "Some text"
scroll_following = true
script = ExtResource("3")
[node name="VBoxContainer" type="HBoxContainer" parent="TextureRect/VBoxContainer"]
offset_top = 238.0
offset_right = 1200.0
offset_bottom = 269.0
alignment = 2
[node name="DialogicNode_ChoiceButton" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 928.0
offset_right = 970.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")
[node name="DialogicNode_ChoiceButton2" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 974.0
offset_right = 1016.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")
[node name="DialogicNode_ChoiceButton3" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 1020.0
offset_right = 1062.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")
[node name="DialogicNode_ChoiceButton4" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 1066.0
offset_right = 1108.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")
[node name="DialogicNode_ChoiceButton5" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 1112.0
offset_right = 1154.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")
[node name="DialogicNode_ChoiceButton6" type="Button" parent="TextureRect/VBoxContainer/VBoxContainer"]
offset_left = 1158.0
offset_right = 1200.0
offset_bottom = 31.0
text = "Text"
script = ExtResource("9")

View file

@ -0,0 +1,154 @@
[gd_scene load_steps=12 format=3]
[ext_resource type="Script" path="res://addons/dialogic/Events/Style/node_style.gd" id="1_aoco8"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_input_handler.gd" id="2_7abe3"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/ExampleTextBubble.gd" id="3_2q2a6"]
[ext_resource type="Texture2D" uid="uid://id54n8h232yn" path="res://addons/dialogic/Example Assets/backgrounds/BubbleEnd.png" id="4_q6vcu"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_dialog_text.gd" id="5_rcetc"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Choice/node_choice_button.gd" id="6_8g1dv"]
[ext_resource type="Script" path="res://addons/dialogic/Example Assets/example-scenes/HideWithChild.gd" id="7_1j72f"]
[ext_resource type="Script" path="res://addons/dialogic/Events/Text/node_name_label.gd" id="8_agitx"]
[sub_resource type="StyleBoxFlat" id="11"]
bg_color = Color(0.847059, 0.627451, 0.364706, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(1, 1, 1, 0.768627)
border_blend = true
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="12"]
content_margin_left = 5.0
content_margin_right = 5.0
bg_color = Color(0.647059, 0.647059, 0.647059, 1)
border_width_top = 10
border_width_bottom = 10
border_color = Color(0.8, 0.8, 0.8, 0)
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="13"]
VScrollBar/styles/grabber = SubResource("11")
VScrollBar/styles/grabber_highlight = SubResource("11")
VScrollBar/styles/grabber_pressed = SubResource("11")
VScrollBar/styles/scroll = SubResource("12")
[node name="TextBubble" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_aoco8")
[node name="DialogicInputHandler" type="Node" parent="."]
script = ExtResource("2_7abe3")
[node name="Control" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
theme = SubResource("13")
script = ExtResource("3_2q2a6")
[node name="BubbleEnd" type="TextureRect" parent="Control"]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
grow_vertical = 0
texture = ExtResource("4_q6vcu")
[node name="DialogText" type="RichTextLabel" parent="Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
text = "Some Text"
scroll_active = false
script = ExtResource("5_rcetc")
[node name="OverlayPanel" type="Panel" parent="Control"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Control"]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 0
grow_vertical = 0
alignment = 2
[node name="DialogicNode_ChoiceButton" type="Button" parent="Control/HBoxContainer"]
layout_mode = 2
offset_right = 39.0
offset_bottom = 31.0
size_flags_horizontal = 4
text = "Yes!"
script = ExtResource("6_8g1dv")
[node name="DialogicNode_ChoiceButton2" type="Button" parent="Control/HBoxContainer"]
layout_mode = 2
offset_left = 43.0
offset_right = 82.0
offset_bottom = 31.0
size_flags_horizontal = 4
text = "Yes!"
script = ExtResource("6_8g1dv")
[node name="DialogicNode_ChoiceButton3" type="Button" parent="Control/HBoxContainer"]
layout_mode = 2
offset_left = 86.0
offset_right = 125.0
offset_bottom = 31.0
size_flags_horizontal = 4
text = "Yes!"
script = ExtResource("6_8g1dv")
[node name="DialogicNode_ChoiceButton4" type="Button" parent="Control/HBoxContainer"]
layout_mode = 2
offset_left = 129.0
offset_right = 168.0
offset_bottom = 31.0
size_flags_horizontal = 4
text = "Yes!"
script = ExtResource("6_8g1dv")
[node name="DialogicNode_ChoiceButton5" type="Button" parent="Control/HBoxContainer"]
layout_mode = 2
offset_left = 172.0
offset_right = 211.0
offset_bottom = 31.0
size_flags_horizontal = 4
text = "Yes!"
script = ExtResource("6_8g1dv")
[node name="NameLabel" type="PanelContainer" parent="Control"]
layout_mode = 0
script = ExtResource("7_1j72f")
[node name="DialogicNode_NameLabel" type="Label" parent="Control/NameLabel"]
layout_mode = 2
offset_right = 1.0
offset_bottom = 23.0
script = ExtResource("8_agitx")
[connection signal="continued_revealing_text" from="Control/DialogText" to="Control" method="_on_DialogText_continued_revealing_text"]
[connection signal="finished_revealing_text" from="Control/DialogText" to="Control" method="_on_DialogText_continued_revealing_text"]