Browse Source

update dialogic

Arnaud Vergnet 3 years ago
parent
commit
356064758a
39 changed files with 1239 additions and 314 deletions
  1. 5
    4
      Main.gd
  2. 8
    1
      Main.tscn
  3. 17
    0
      UI.tscn
  4. 51
    21
      addons/dialogic/Dialog.tscn
  5. 6
    3
      addons/dialogic/Editor/MasterTree/MasterTree.gd
  6. 23
    8
      addons/dialogic/Editor/Pieces/AudioBlock.gd
  7. 13
    4
      addons/dialogic/Editor/Pieces/AudioBlock.tscn
  8. 63
    0
      addons/dialogic/Editor/Pieces/BackgroundMusic.gd
  9. 128
    0
      addons/dialogic/Editor/Pieces/BackgroundMusic.tscn
  10. 54
    0
      addons/dialogic/Editor/Pieces/Common/OperationPicker.gd
  11. 13
    0
      addons/dialogic/Editor/Pieces/Common/OperationPicker.tscn
  12. 6
    3
      addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.gd
  13. 12
    1
      addons/dialogic/Editor/Pieces/SetValue.gd
  14. 11
    13
      addons/dialogic/Editor/Pieces/SetValue.tscn
  15. 6
    0
      addons/dialogic/Editor/ThemeEditor/SectionTitle.gd
  16. 35
    0
      addons/dialogic/Editor/ThemeEditor/SectionTitle.tscn
  17. 95
    5
      addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd
  18. 292
    148
      addons/dialogic/Editor/ThemeEditor/ThemeEditor.tscn
  19. 3
    1
      addons/dialogic/Editor/TimelineEditor/TimelineEditor.gd
  20. 67
    59
      addons/dialogic/Editor/TimelineEditor/TimelineEditor.tscn
  21. 0
    1
      addons/dialogic/Images/ListSelect.svg
  22. 3
    0
      addons/dialogic/Images/Resources/definition.svg
  23. 34
    0
      addons/dialogic/Images/Resources/definition.svg.import
  24. 3
    0
      addons/dialogic/Images/Resources/glossary.svg
  25. 3
    3
      addons/dialogic/Images/Resources/glossary.svg.import
  26. 4
    0
      addons/dialogic/Images/Resources/theme.svg
  27. 3
    3
      addons/dialogic/Images/Resources/theme.svg.import
  28. 1
    2
      addons/dialogic/Images/Toolbar/add-character.svg
  29. 2
    2
      addons/dialogic/Images/Toolbar/add-definition.svg
  30. 1
    1
      addons/dialogic/Images/Toolbar/add-theme.svg
  31. 4
    8
      addons/dialogic/Images/Toolbar/add-timeline.svg
  32. 0
    4
      addons/dialogic/Images/glossary.svg
  33. 24
    0
      addons/dialogic/Nodes/BackgroundMusic.gd
  34. 152
    0
      addons/dialogic/Nodes/BackgroundMusic.tscn
  35. 49
    17
      addons/dialogic/Nodes/dialog_node.gd
  36. 27
    2
      addons/dialogic/Other/DialogicSingleton.gd
  37. 6
    0
      dialogic/themes/theme-1616657646.cfg
  38. 9
    0
      dialogic/themes/theme-1616657657.cfg
  39. 6
    0
      project.godot

+ 5
- 4
Main.gd View File

@@ -4,10 +4,11 @@ extends Node
4 4
 
5 5
 # Called when the node enters the scene tree for the first time.
6 6
 func _ready():
7
-	var new_dialog = Dialogic.start('_start')
8
-	add_child(new_dialog)
9
-	new_dialog.connect('dialogic_signal', self, "_on_Dialogic_signal_received")
10
-	new_dialog.connect('event_end', self, "_on_Dialogic_event_end")
7
+	pass
8
+#	var new_dialog = Dialogic.start('_start')
9
+#	add_child(new_dialog)
10
+#	new_dialog.connect('dialogic_signal', self, "_on_Dialogic_signal_received")
11
+#	new_dialog.connect('event_end', self, "_on_Dialogic_event_end")
11 12
 
12 13
 
13 14
 func _on_Dialogic_signal_received(value: String):

+ 8
- 1
Main.tscn View File

@@ -1,6 +1,13 @@
1
-[gd_scene load_steps=2 format=2]
1
+[gd_scene load_steps=4 format=2]
2 2
 
3 3
 [ext_resource path="res://Main.gd" type="Script" id=1]
4
+[ext_resource path="res://addons/dialogic/Dialog.tscn" type="PackedScene" id=2]
5
+[ext_resource path="res://UI.tscn" type="PackedScene" id=3]
4 6
 
5 7
 [node name="Main" type="Node"]
6 8
 script = ExtResource( 1 )
9
+
10
+[node name="DialogNode" parent="." instance=ExtResource( 2 )]
11
+timeline = "timeline-1616659306.json"
12
+
13
+[node name="UI" parent="." instance=ExtResource( 3 )]

+ 17
- 0
UI.tscn View File

@@ -0,0 +1,17 @@
1
+[gd_scene format=2]
2
+
3
+[node name="UI" type="Control"]
4
+anchor_right = 1.0
5
+anchor_bottom = 1.0
6
+mouse_filter = 2
7
+__meta__ = {
8
+"_edit_use_anchors_": false
9
+}
10
+
11
+[node name="Label" type="Label" parent="."]
12
+anchor_right = 1.0
13
+anchor_bottom = 1.0
14
+text = "UI"
15
+__meta__ = {
16
+"_edit_use_anchors_": false
17
+}

+ 51
- 21
addons/dialogic/Dialog.tscn View File

@@ -1,4 +1,4 @@
1
-[gd_scene load_steps=10 format=2]
1
+[gd_scene load_steps=12 format=2]
2 2
 
3 3
 [ext_resource path="res://addons/dialogic/Images/next-indicator.png" type="Texture" id=1]
4 4
 [ext_resource path="res://addons/dialogic/Images/background/background-2.png" type="Texture" id=2]
@@ -6,9 +6,11 @@
6 6
 [ext_resource path="res://addons/dialogic/Fonts/GlossaryFont.tres" type="DynamicFont" id=4]
7 7
 [ext_resource path="res://addons/dialogic/Nodes/glossary_info.gd" type="Script" id=5]
8 8
 [ext_resource path="res://addons/dialogic/Nodes/dialog_node.gd" type="Script" id=6]
9
+[ext_resource path="res://addons/dialogic/Nodes/BackgroundMusic.tscn" type="PackedScene" id=7]
9 10
 
10 11
 [sub_resource type="StyleBoxFlat" id=1]
11 12
 bg_color = Color( 1, 1, 1, 0 )
13
+expand_margin_left = 10.0
12 14
 
13 15
 [sub_resource type="Animation" id=2]
14 16
 loop = true
@@ -26,6 +28,12 @@ tracks/0/keys = {
26 28
 }
27 29
 
28 30
 [sub_resource type="StyleBoxFlat" id=3]
31
+content_margin_left = 10.0
32
+content_margin_right = 10.0
33
+bg_color = Color( 1, 1, 1, 0 )
34
+expand_margin_left = 10.0
35
+
36
+[sub_resource type="StyleBoxFlat" id=4]
29 37
 bg_color = Color( 0.196078, 0.196078, 0.196078, 0 )
30 38
 
31 39
 [node name="DialogNode" type="Control"]
@@ -65,20 +73,19 @@ margin_top = -207.0
65 73
 margin_right = 455.0
66 74
 margin_bottom = -40.0
67 75
 __meta__ = {
68
-"_edit_group_": true,
69 76
 "_edit_use_anchors_": false
70 77
 }
71 78
 
72 79
 [node name="ColorRect" type="ColorRect" parent="TextBubble"]
73
-visible = false
74 80
 anchor_right = 1.0
75 81
 anchor_bottom = 1.0
76
-color = Color( 0, 0, 0, 1 )
82
+color = Color( 0, 0, 0, 0.639216 )
77 83
 __meta__ = {
78 84
 "_edit_use_anchors_": false
79 85
 }
80 86
 
81 87
 [node name="TextureRect" type="TextureRect" parent="TextBubble"]
88
+visible = false
82 89
 anchor_right = 1.0
83 90
 anchor_bottom = 1.0
84 91
 texture = ExtResource( 2 )
@@ -98,8 +105,8 @@ margin_bottom = -10.0
98 105
 rect_clip_content = false
99 106
 custom_styles/normal = SubResource( 1 )
100 107
 custom_fonts/normal_font = ExtResource( 3 )
101
-custom_colors/default_color = Color( 0.756863, 0.172549, 0.172549, 1 )
102
-custom_colors/font_color_shadow = Color( 0, 0, 0, 0.619608 )
108
+custom_colors/default_color = Color( 1, 1, 1, 1 )
109
+custom_colors/font_color_shadow = Color( 1, 1, 1, 0 )
103 110
 custom_constants/shadow_offset_x = 2
104 111
 custom_constants/shadow_offset_y = 2
105 112
 bbcode_enabled = true
@@ -133,22 +140,43 @@ __meta__ = {
133 140
 autoplay = "IDLE"
134 141
 anims/IDLE = SubResource( 2 )
135 142
 
136
-[node name="NameLabel" type="RichTextLabel" parent="TextBubble"]
137
-margin_left = 2.0
138
-margin_top = -37.0
139
-margin_right = 369.0
140
-rect_clip_content = false
141
-custom_styles/normal = SubResource( 1 )
142
-custom_fonts/normal_font = ExtResource( 3 )
143
-custom_colors/default_color = Color( 0.756863, 0.172549, 0.172549, 1 )
144
-custom_colors/font_color_shadow = Color( 0, 0, 0, 0.619608 )
143
+[node name="NameLabel" type="Label" parent="TextBubble"]
144
+margin_top = -40.0
145
+margin_right = 58.0
146
+size_flags_vertical = 1
147
+custom_styles/normal = SubResource( 3 )
148
+custom_fonts/font = ExtResource( 3 )
149
+custom_colors/font_color = Color( 1, 1, 1, 1 )
150
+custom_colors/font_color_shadow = Color( 1, 1, 1, 0 )
145 151
 custom_constants/shadow_offset_x = 2
146 152
 custom_constants/shadow_offset_y = 2
147
-custom_constants/shadow_as_outline = 10
148
-bbcode_enabled = true
149
-bbcode_text = "Name Here"
150
-text = "Name Here"
151
-scroll_active = false
153
+align = 1
154
+valign = 1
155
+__meta__ = {
156
+"_edit_use_anchors_": false
157
+}
158
+
159
+[node name="ColorRect" type="ColorRect" parent="TextBubble/NameLabel"]
160
+show_behind_parent = true
161
+anchor_right = 1.0
162
+anchor_bottom = 1.0
163
+size_flags_horizontal = 15
164
+size_flags_vertical = 15
165
+color = Color( 0, 0, 0, 0.721569 )
166
+__meta__ = {
167
+"_edit_use_anchors_": false
168
+}
169
+
170
+[node name="TextureRect" type="TextureRect" parent="TextBubble/NameLabel"]
171
+visible = false
172
+show_behind_parent = true
173
+anchor_right = 1.0
174
+anchor_bottom = 1.0
175
+size_flags_horizontal = 3
176
+size_flags_vertical = 3
177
+texture = ExtResource( 2 )
178
+expand = true
179
+stretch_mode = 1
152 180
 __meta__ = {
153 181
 "_edit_use_anchors_": false
154 182
 }
@@ -213,13 +241,15 @@ __meta__ = {
213 241
 
214 242
 [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="FX"]
215 243
 
244
+[node name="BackgroundMusic" parent="FX" instance=ExtResource( 7 )]
245
+
216 246
 [node name="DefinitionInfo" type="PanelContainer" parent="."]
217 247
 visible = false
218 248
 margin_right = 208.0
219 249
 mouse_filter = 1
220 250
 size_flags_horizontal = 3
221 251
 size_flags_vertical = 3
222
-custom_styles/panel = SubResource( 3 )
252
+custom_styles/panel = SubResource( 4 )
223 253
 script = ExtResource( 5 )
224 254
 __meta__ = {
225 255
 "_edit_group_": true,

+ 6
- 3
addons/dialogic/Editor/MasterTree/MasterTree.gd View File

@@ -12,6 +12,9 @@ onready var empty_editor = get_node('../Empty')
12 12
 onready var tree = self
13 13
 var timeline_icon = load("res://addons/dialogic/Images/timeline.svg")
14 14
 var character_icon = load("res://addons/dialogic/Images/character.svg")
15
+var theme_icon = load("res://addons/dialogic/Images/Resources/theme.svg")
16
+var definition_icon = load("res://addons/dialogic/Images/Resources/definition.svg")
17
+var glossary_icon = load("res://addons/dialogic/Images/Resources/glossary.svg")
15 18
 var timelines_tree
16 19
 var characters_tree
17 20
 var definitions_tree
@@ -115,7 +118,7 @@ func build_themes(selected_item: String=''):
115 118
 
116 119
 func _add_theme(theme_item, select = false):
117 120
 	var item = tree.create_item(themes_tree)
118
-	item.set_icon(0, get_icon("StyleBoxTexture", "EditorIcons"))
121
+	item.set_icon(0, theme_icon)
119 122
 	item.set_text(0, theme_item['name'])
120 123
 	theme_item['editor'] = 'Theme'
121 124
 	item.set_metadata(0, theme_item)
@@ -156,9 +159,9 @@ func build_definitions(selected_item: String=''):
156 159
 func _add_definition(definition, select = false):
157 160
 	var item = tree.create_item(definitions_tree)
158 161
 	item.set_text(0, definition['name'])
159
-	item.set_icon(0, get_icon("Variant", "EditorIcons"))
162
+	item.set_icon(0, definition_icon)
160 163
 	if definition['type'] == 1:
161
-		item.set_icon(0, get_icon("ScriptCreateDialog", "EditorIcons"))
164
+		item.set_icon(0, glossary_icon)
162 165
 		
163 166
 	definition['editor'] = 'Definition'
164 167
 	item.set_metadata(0, definition)

+ 23
- 8
addons/dialogic/Editor/Pieces/AudioBlock.gd View File

@@ -1,5 +1,5 @@
1 1
 tool
2
-extends Control
2
+extends HBoxContainer
3 3
 
4 4
 var editor_reference
5 5
 var editorPopup
@@ -9,11 +9,14 @@ var stop_icon = load("res://addons/dialogic/Images/stop.svg")
9 9
 
10 10
 # This is the information of this event and it will get parsed and saved to the JSON file.
11 11
 var event_data = {
12
-	'audio': 'play',
12
+	'audio': 'stop',
13 13
 	'file': ''
14 14
 }
15 15
 
16 16
 
17
+func _ready():
18
+	load_audio('')
19
+
17 20
 func _on_ButtonAudio_pressed():
18 21
 	editor_reference.godot_dialog("*.wav, *.ogg, *.mp3")
19 22
 	editor_reference.godot_dialog_connect(self, "_on_file_selected")
@@ -23,16 +26,24 @@ func _on_file_selected(path, target):
23 26
 	target.load_audio(path)
24 27
 
25 28
 
26
-func load_audio(path):
27
-	$PanelContainer/VBoxContainer/Header/Name.text = path
28
-	$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
29
-	event_data['file'] = path
29
+func load_audio(path: String):
30
+	if not path.empty():
31
+		$PanelContainer/VBoxContainer/Header/Name.text = path
32
+		$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = false
33
+		$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
34
+		event_data['file'] = path
35
+		event_data['audio'] = 'play'
36
+	else:
37
+		$PanelContainer/VBoxContainer/Header/Name.text = 'No sound (will stop previous audio event)'
38
+		$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = true
39
+		$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = true
40
+		event_data['file'] = ''
41
+		event_data['audio'] = 'stop'
30 42
 
31 43
 
32 44
 func load_data(data):
33 45
 	event_data = data
34
-	if data['file'] != '':
35
-		load_audio(data['file'])
46
+	load_audio(data['file'])
36 47
 
37 48
 
38 49
 func _on_ButtonPreviewPlay_pressed():
@@ -46,3 +57,7 @@ func _on_ButtonPreviewPlay_pressed():
46 57
 
47 58
 func _on_AudioPreview_finished():
48 59
 	$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = play_icon
60
+
61
+
62
+func _on_ButtonClear_pressed():
63
+	load_audio('')

+ 13
- 4
addons/dialogic/Editor/Pieces/AudioBlock.tscn View File

@@ -1,4 +1,4 @@
1
-[gd_scene load_steps=8 format=2]
1
+[gd_scene load_steps=9 format=2]
2 2
 
3 3
 [ext_resource path="res://addons/dialogic/Editor/Pieces/AudioBlock.gd" type="Script" id=1]
4 4
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=2]
@@ -6,6 +6,7 @@
6 6
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
7 7
 [ext_resource path="res://addons/dialogic/Images/play.svg" type="Texture" id=5]
8 8
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=6]
9
+[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=7]
9 10
 
10 11
 [sub_resource type="StyleBoxFlat" id=1]
11 12
 content_margin_left = 16.0
@@ -83,9 +84,16 @@ margin_right = 115.0
83 84
 margin_bottom = 28.0
84 85
 text = "..."
85 86
 
86
-[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
87
+[node name="ButtonClear" type="Button" parent="PanelContainer/VBoxContainer/Header"]
87 88
 margin_left = 119.0
88
-margin_right = 153.0
89
+margin_right = 147.0
90
+margin_bottom = 28.0
91
+disabled = true
92
+icon = ExtResource( 7 )
93
+
94
+[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
95
+margin_left = 151.0
96
+margin_right = 185.0
89 97
 margin_bottom = 28.0
90 98
 disabled = true
91 99
 icon = ExtResource( 5 )
@@ -100,7 +108,7 @@ custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
100 108
 text = "    ..."
101 109
 
102 110
 [node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
103
-margin_left = 157.0
111
+margin_left = 189.0
104 112
 margin_right = 1735.0
105 113
 margin_bottom = 28.0
106 114
 
@@ -114,5 +122,6 @@ items = [ "Move Up", null, 0, false, false, 0, 0, null, "", false, "Move Down",
114 122
 
115 123
 [node name="DragController" parent="." instance=ExtResource( 6 )]
116 124
 [connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonAudio" to="." method="_on_ButtonAudio_pressed"]
125
+[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonClear" to="." method="_on_ButtonClear_pressed"]
117 126
 [connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonPreviewPlay" to="." method="_on_ButtonPreviewPlay_pressed"]
118 127
 [connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

+ 63
- 0
addons/dialogic/Editor/Pieces/BackgroundMusic.gd View File

@@ -0,0 +1,63 @@
1
+tool
2
+extends HBoxContainer
3
+
4
+var editor_reference
5
+var editorPopup
6
+
7
+var play_icon = load("res://addons/dialogic/Images/play.svg")
8
+var stop_icon = load("res://addons/dialogic/Images/stop.svg")
9
+
10
+# This is the information of this event and it will get parsed and saved to the JSON file.
11
+var event_data = {
12
+	'background-music': 'stop',
13
+	'file': ''
14
+}
15
+
16
+
17
+func _ready():
18
+	load_audio('')
19
+
20
+func _on_ButtonAudio_pressed():
21
+	editor_reference.godot_dialog("*.wav, *.ogg, *.mp3")
22
+	editor_reference.godot_dialog_connect(self, "_on_file_selected")
23
+
24
+
25
+func _on_file_selected(path, target):
26
+	target.load_audio(path)
27
+
28
+
29
+func load_audio(path: String):
30
+	if not path.empty():
31
+		$PanelContainer/VBoxContainer/Header/Name.text = path
32
+		$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = false
33
+		$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
34
+		event_data['file'] = path
35
+		event_data['background-music'] = 'play'
36
+	else:
37
+		$PanelContainer/VBoxContainer/Header/Name.text = 'No music (will stop with fade out)'
38
+		$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = true
39
+		$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = true
40
+		event_data['file'] = ''
41
+		event_data['background-music'] = 'stop'
42
+
43
+
44
+func load_data(data):
45
+	event_data = data
46
+	load_audio(data['file'])
47
+
48
+
49
+func _on_ButtonPreviewPlay_pressed():
50
+	if $PanelContainer/AudioPreview.is_playing():
51
+		$PanelContainer/AudioPreview.stop()
52
+	else:
53
+		$PanelContainer/AudioPreview.stream = load(event_data['file'])
54
+		$PanelContainer/AudioPreview.play()
55
+		$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = stop_icon
56
+
57
+
58
+func _on_AudioPreview_finished():
59
+	$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = play_icon
60
+
61
+
62
+func _on_ButtonClear_pressed():
63
+	load_audio('')

+ 128
- 0
addons/dialogic/Editor/Pieces/BackgroundMusic.tscn View File

@@ -0,0 +1,128 @@
1
+[gd_scene load_steps=9 format=2]
2
+
3
+[ext_resource path="res://addons/dialogic/Editor/Pieces/BackgroundMusic.gd" type="Script" id=1]
4
+[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=2]
5
+[ext_resource path="res://addons/dialogic/Images/audio-event.svg" type="Texture" id=3]
6
+[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
7
+[ext_resource path="res://addons/dialogic/Images/play.svg" type="Texture" id=5]
8
+[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=6]
9
+[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=7]
10
+
11
+[sub_resource type="StyleBoxFlat" id=1]
12
+content_margin_left = 16.0
13
+content_margin_right = 6.0
14
+content_margin_top = 6.0
15
+content_margin_bottom = 6.0
16
+bg_color = Color( 0.298039, 0.172549, 0.14902, 0.447059 )
17
+border_width_left = 2
18
+border_width_top = 2
19
+border_width_right = 2
20
+border_width_bottom = 2
21
+border_color = Color( 0.12549, 0.12549, 0.12549, 1 )
22
+corner_radius_top_left = 6
23
+corner_radius_top_right = 6
24
+corner_radius_bottom_right = 6
25
+corner_radius_bottom_left = 6
26
+
27
+[node name="BackgroundMusic" type="HBoxContainer"]
28
+margin_right = 1798.0
29
+margin_bottom = 42.0
30
+size_flags_horizontal = 3
31
+size_flags_vertical = 9
32
+script = ExtResource( 1 )
33
+__meta__ = {
34
+"_edit_use_anchors_": false
35
+}
36
+
37
+[node name="Indent" type="Control" parent="."]
38
+visible = false
39
+margin_left = 6.0
40
+margin_top = 6.0
41
+margin_right = 1792.0
42
+margin_bottom = 36.0
43
+
44
+[node name="PanelContainer" type="PanelContainer" parent="."]
45
+margin_right = 1798.0
46
+margin_bottom = 42.0
47
+mouse_filter = 1
48
+size_flags_horizontal = 3
49
+custom_styles/panel = SubResource( 1 )
50
+
51
+[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
52
+margin_left = 16.0
53
+margin_top = 6.0
54
+margin_right = 1792.0
55
+margin_bottom = 36.0
56
+size_flags_horizontal = 3
57
+
58
+[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
59
+margin_right = 1776.0
60
+margin_bottom = 28.0
61
+
62
+[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
63
+margin_right = 22.0
64
+margin_bottom = 28.0
65
+texture = ExtResource( 3 )
66
+stretch_mode = 6
67
+
68
+[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
69
+margin_left = 26.0
70
+margin_top = 7.0
71
+margin_right = 150.0
72
+margin_bottom = 21.0
73
+text = "  Background Music"
74
+
75
+[node name="Name" type="Label" parent="PanelContainer/VBoxContainer/Header"]
76
+margin_left = 154.0
77
+margin_top = 7.0
78
+margin_right = 188.0
79
+margin_bottom = 21.0
80
+text = "None"
81
+
82
+[node name="ButtonAudio" type="Button" parent="PanelContainer/VBoxContainer/Header"]
83
+margin_left = 192.0
84
+margin_right = 216.0
85
+margin_bottom = 28.0
86
+text = "..."
87
+
88
+[node name="ButtonClear" type="Button" parent="PanelContainer/VBoxContainer/Header"]
89
+margin_left = 220.0
90
+margin_right = 248.0
91
+margin_bottom = 28.0
92
+disabled = true
93
+icon = ExtResource( 7 )
94
+
95
+[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
96
+margin_left = 252.0
97
+margin_right = 286.0
98
+margin_bottom = 28.0
99
+disabled = true
100
+icon = ExtResource( 5 )
101
+
102
+[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
103
+visible = false
104
+margin_left = 103.0
105
+margin_top = 8.0
106
+margin_right = 131.0
107
+margin_bottom = 22.0
108
+custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
109
+text = "    ..."
110
+
111
+[node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
112
+margin_left = 290.0
113
+margin_right = 1735.0
114
+margin_bottom = 28.0
115
+
116
+[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
117
+margin_left = 1739.0
118
+margin_right = 1776.0
119
+margin_bottom = 28.0
120
+items = [ "Move Up", null, 0, false, false, 0, 0, null, "", false, "Move Down", null, 0, false, false, 1, 0, null, "", false, "", null, 0, false, false, 2, 0, null, "", true, "Remove", null, 0, false, false, 3, 0, null, "", false ]
121
+
122
+[node name="AudioPreview" type="AudioStreamPlayer" parent="PanelContainer"]
123
+
124
+[node name="DragController" parent="." instance=ExtResource( 6 )]
125
+[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonAudio" to="." method="_on_ButtonAudio_pressed"]
126
+[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonClear" to="." method="_on_ButtonClear_pressed"]
127
+[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonPreviewPlay" to="." method="_on_ButtonPreviewPlay_pressed"]
128
+[connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

+ 54
- 0
addons/dialogic/Editor/Pieces/Common/OperationPicker.gd View File

@@ -0,0 +1,54 @@
1
+tool
2
+extends MenuButton
3
+
4
+var options = [
5
+	{
6
+		"text": "[ To be ]",
7
+		"operation": "="
8
+	},
9
+	{
10
+		"text": "[ add ]",
11
+		"operation": "+"
12
+	},
13
+	{
14
+		"text": "[ remove ]",
15
+		"operation": "-"
16
+	},
17
+	{
18
+		"text": "[ multiply by ]",
19
+		"operation": "*"
20
+	},
21
+	{
22
+		"text": "[ divide by ]",
23
+		"operation": "/"
24
+	},
25
+]
26
+
27
+func _ready():
28
+	get_popup().connect("index_pressed", self, '_on_entry_selected')
29
+	get_popup().clear()
30
+	connect("about_to_show", self, "_on_MenuButton_about_to_show")
31
+
32
+
33
+func _on_MenuButton_about_to_show():
34
+	get_popup().clear()
35
+	var index = 0
36
+	for o in options:
37
+		get_popup().add_item(o['text'])
38
+		get_popup().set_item_metadata(index, o)
39
+		index += 1
40
+
41
+
42
+func _on_entry_selected(index):
43
+	var _text = get_popup().get_item_text(index)
44
+	var metadata = get_popup().get_item_metadata(index)
45
+	text = _text
46
+
47
+
48
+func load_condition(condition):
49
+	if condition != '':
50
+		for o in options:
51
+			if (o['operation'] == condition):
52
+				text = o['text']
53
+	else:
54
+		text = options[0]['text']

+ 13
- 0
addons/dialogic/Editor/Pieces/Common/OperationPicker.tscn View File

@@ -0,0 +1,13 @@
1
+[gd_scene load_steps=2 format=2]
2
+
3
+[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/OperationPicker.gd" type="Script" id=1]
4
+
5
+[node name="OperationPicker" type="MenuButton"]
6
+margin_left = 284.0
7
+margin_right = 296.0
8
+margin_bottom = 28.0
9
+text = "[ To be ]"
10
+script = ExtResource( 1 )
11
+__meta__ = {
12
+"_edit_use_anchors_": false
13
+}

+ 6
- 3
addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.gd View File

@@ -12,14 +12,17 @@ func _ready():
12 12
 
13 13
 
14 14
 func _on_OptionSelected(index):
15
+	var timeline_editor = current_piece.editor_reference.get_node('MainPanel/TimelineEditor')
15 16
 	if index == 0:
16 17
 		# Moving this up
17
-		current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'up')
18
+		timeline_editor.move_block(current_piece, 'up')
18 19
 	elif index == 1:
19 20
 		# Moving piece down
20
-		current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'down')
21
+		timeline_editor.move_block(current_piece, 'down')
21 22
 	elif index == 3:
22 23
 		# Removing a piece
24
+		if timeline_editor.selected_item == current_piece:
25
+			timeline_editor.selected_item = null
23 26
 		# TODO: Add a warning here if the event has changes
24 27
 		current_piece.queue_free()
25
-	current_piece.editor_reference.get_node('MainPanel/TimelineEditor').indent_events()
28
+	timeline_editor.indent_events()

+ 12
- 1
addons/dialogic/Editor/Pieces/SetValue.gd View File

@@ -7,27 +7,38 @@ var editorPopup
7 7
 
8 8
 # This is the information of this event and it will get parsed and saved to the JSON file.
9 9
 var event_data = {
10
+	'definition': '',
11
+	'operation': '=',
10 12
 	'set_value': '',
11
-	'definition': ''
12 13
 }
13 14
 
14 15
 onready var nodes = {
15 16
 	'definition_picker': $PanelContainer/VBoxContainer/Header/DefinitionPicker,
17
+	'operation_picker': $PanelContainer/VBoxContainer/Header/OperationPicker,
16 18
 }
17 19
 
18 20
 func _ready():
19 21
 	nodes['definition_picker'].get_popup().connect("index_pressed", self, '_on_definition_entry_selected')
22
+	nodes['operation_picker'].get_popup().connect("index_pressed", self, '_on_operation_entry_selected')
20 23
 
21 24
 
22 25
 func _on_definition_entry_selected(index):
23 26
 	var metadata = nodes['definition_picker'].get_popup().get_item_metadata(index)
24 27
 	event_data['definition'] = metadata['id']
25 28
 
29
+func _on_operation_entry_selected(index):
30
+	var metadata = nodes['operation_picker'].get_popup().get_item_metadata(index)
31
+	event_data['operation'] = metadata['operation']
32
+
26 33
 
27 34
 func load_data(data):
28 35
 	event_data = data
29 36
 	$PanelContainer/VBoxContainer/Header/LineEdit.text = event_data['set_value']
30 37
 	nodes['definition_picker'].load_definition(data['definition'])
38
+	var operation = ''
39
+	if 'operation' in data:
40
+		operation = data['operation']
41
+	nodes['operation_picker'].load_condition(operation)
31 42
 
32 43
 
33 44
 func _on_LineEdit_text_changed(new_text):

+ 11
- 13
addons/dialogic/Editor/Pieces/SetValue.tscn View File

@@ -1,11 +1,12 @@
1
-[gd_scene load_steps=9 format=2]
1
+[gd_scene load_steps=10 format=2]
2 2
 
3 3
 [ext_resource path="res://addons/dialogic/Editor/Pieces/SetValue.gd" type="Script" id=1]
4
-[ext_resource path="res://addons/dialogic/Images/Events/set-value.svg" type="Texture" id=2]
4
+[ext_resource path="res://addons/dialogic/Images/Resources/definition.svg" type="Texture" id=2]
5 5
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=3]
6 6
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
7 7
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
8 8
 [ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DefinitionPicker.tscn" type="PackedScene" id=6]
9
+[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/OperationPicker.tscn" type="PackedScene" id=7]
9 10
 
10 11
 [sub_resource type="StyleBoxFlat" id=1]
11 12
 content_margin_left = 16.0
@@ -86,16 +87,12 @@ margin_left = 137.0
86 87
 margin_right = 280.0
87 88
 margin_bottom = 28.0
88 89
 
89
-[node name="Title2" type="Label" parent="PanelContainer/VBoxContainer/Header"]
90
-margin_left = 284.0
91
-margin_top = 7.0
92
-margin_right = 333.0
93
-margin_bottom = 21.0
94
-text = "to be    "
90
+[node name="OperationPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
91
+margin_right = 347.0
95 92
 
96 93
 [node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
97
-margin_left = 337.0
98
-margin_right = 385.0
94
+margin_left = 351.0
95
+margin_right = 399.0
99 96
 margin_bottom = 28.0
100 97
 custom_styles/read_only = SubResource( 2 )
101 98
 custom_styles/focus = SubResource( 2 )
@@ -112,14 +109,14 @@ caret_blink = true
112 109
 caret_blink_speed = 0.5
113 110
 
114 111
 [node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
115
-margin_left = 389.0
112
+margin_left = 403.0
116 113
 margin_top = 7.0
117
-margin_right = 389.0
114
+margin_right = 403.0
118 115
 margin_bottom = 21.0
119 116
 custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
120 117
 
121 118
 [node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 3 )]
122
-margin_left = 393.0
119
+margin_left = 407.0
123 120
 margin_right = 941.0
124 121
 margin_bottom = 28.0
125 122
 
@@ -130,4 +127,5 @@ margin_bottom = 28.0
130 127
 items = [ "Move Up", null, 0, false, false, 0, 0, null, "", false, "Move Down", null, 0, false, false, 1, 0, null, "", false, "", null, 0, false, false, 2, 0, null, "", true, "Remove", null, 0, false, false, 3, 0, null, "", false ]
131 128
 
132 129
 [node name="DragController" parent="." instance=ExtResource( 5 )]
130
+
133 131
 [connection signal="text_changed" from="PanelContainer/VBoxContainer/Header/LineEdit" to="." method="_on_LineEdit_text_changed"]

+ 6
- 0
addons/dialogic/Editor/ThemeEditor/SectionTitle.gd View File

@@ -0,0 +1,6 @@
1
+tool
2
+extends Panel
3
+
4
+
5
+func _ready():
6
+	$HBoxContainer/Label.text = name

+ 35
- 0
addons/dialogic/Editor/ThemeEditor/SectionTitle.tscn View File

@@ -0,0 +1,35 @@
1
+[gd_scene load_steps=2 format=2]
2
+
3
+[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/SectionTitle.gd" type="Script" id=1]
4
+
5
+[node name="PanelContainer" type="Panel"]
6
+margin_right = 138.0
7
+margin_bottom = 30.0
8
+rect_min_size = Vector2( 0, 30 )
9
+script = ExtResource( 1 )
10
+__meta__ = {
11
+"_edit_use_anchors_": false
12
+}
13
+
14
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
15
+anchor_right = 1.0
16
+anchor_bottom = 1.0
17
+__meta__ = {
18
+"_edit_use_anchors_": false
19
+}
20
+
21
+[node name="Label" type="Label" parent="HBoxContainer"]
22
+margin_top = 8.0
23
+margin_right = 138.0
24
+margin_bottom = 22.0
25
+size_flags_horizontal = 3
26
+text = "PanelContainer"
27
+__meta__ = {
28
+"_edit_use_anchors_": false
29
+}
30
+
31
+[node name="CheckBox" type="CheckBox" parent="HBoxContainer"]
32
+visible = false
33
+margin_left = 114.0
34
+margin_right = 138.0
35
+margin_bottom = 30.0

+ 95
- 5
addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd View File

@@ -51,6 +51,18 @@ onready var n = {
51 51
 	# Text preview
52 52
 	'preview_panel': $VBoxContainer/Panel,
53 53
 	'text_preview': $VBoxContainer/HBoxContainer3/TextEdit,
54
+	
55
+	# Character Names
56
+	'name_auto_color': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/CheckBox,
57
+	'name_background_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/CheckBox,
58
+	'name_background': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/ColorPickerButton,
59
+	'name_image': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/BackgroundTextureButton,
60
+	'name_image_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/CheckBox,
61
+	'name_shadow': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/ColorPickerButtonShadow,
62
+	'name_shadow_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/CheckBoxShadow,
63
+	'name_shadow_offset_x': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetX,
64
+	'name_shadow_offset_y': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetY,
65
+	'name_bottom_gap': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5/BottomGap,
54 66
 }
55 67
 
56 68
 func _ready():
@@ -113,9 +125,29 @@ func load_theme(filename):
113 125
 		'Right':
114 126
 			n['alignment'].select(2)
115 127
 	
128
+	
129
+	# Name
130
+	n['name_auto_color'].pressed = theme.get_value('name', 'auto_color', true)
131
+	n['name_background_visible'].pressed = theme.get_value('name', 'background_visible', false)
132
+	n['name_background'].color = Color(theme.get_value('name', 'background', "#ff000000"))
133
+	n['name_image_visible'].pressed = theme.get_value('name', 'image_visible', false)
134
+	n['name_image'].text = DialogicResources.get_filename_from_path(theme.get_value('name', 'image', 'res://addons/dialogic/Images/background/background-2.png'))
135
+	
136
+	
137
+	n['name_shadow'].color = Color(theme.get_value('name', 'shadow', "#9e000000"))
138
+	n['name_shadow_visible'].pressed = theme.get_value('name', 'shadow_visible', true)
139
+	n['name_shadow_offset_x'].value = theme.get_value('name', 'shadow_offset', Vector2(2,2)).x
140
+	n['name_shadow_offset_y'].value = theme.get_value('name', 'shadow_offset', Vector2(2,2)).y
141
+	n['name_bottom_gap'].value = theme.get_value('name', 'bottom_gap', 48)
142
+	
143
+	
144
+	
116 145
 	# Preview text
117 146
 	n['text_preview'].text = theme.get_value('text', 'preview', 'This is preview text. You can use  [color=#A5EFAC]BBCode[/color] to style it.\n[wave amp=50 freq=2]You can even use effects![/wave]')
118 147
 	
148
+	# Updating the preview
149
+	_on_PreviewButton_pressed()
150
+
119 151
 
120 152
 func new_theme():
121 153
 	var theme_file = 'theme-' + str(OS.get_unix_time()) + '.cfg'
@@ -172,21 +204,36 @@ func _on_PreviewButton_pressed():
172 204
 	preview_dialog.preview = true
173 205
 	preview_dialog.get_node('DefinitionInfo').in_theme_editor = true
174 206
 	preview_dialog.get_node('TextBubble/NextIndicator/AnimationPlayer').play('IDLE')
207
+	
208
+	# Random character preview if there are any
209
+	var characters = DialogicUtil.get_character_list()
210
+	var character_file = ''
211
+	if characters.size():
212
+		characters.shuffle()
213
+		character_file = characters[0]['file']
214
+	
215
+	# Creating the one event timeline for the dialog
175 216
 	preview_dialog.dialog_script['events'] = [{
176
-		"character":"",
177
-		"portrait":"",
217
+		"character": character_file,
218
+		"portrait":'',
178 219
 		"text": preview_dialog.parse_definitions(n['text_preview'].text)
179 220
 	}]
180
-	# Settings
221
+	preview_dialog.parse_characters(preview_dialog.dialog_script)
181 222
 	preview_dialog.settings = DialogicResources.get_settings_config()
223
+	
182 224
 	# Alignment
183 225
 	n['preview_panel'].add_child(preview_dialog)
184
-	# Not sure why but I need to reload the theme again for it to work properly
226
+	
185 227
 	preview_dialog.load_dialog()
186 228
 	preview_dialog.current_theme = preview_dialog.load_theme(current_theme)
187 229
 	
230
+	# When not performing this step, the dialog name doesn't update the color for some reason
231
+	# I should probably refactor the preview dialog to stop making everything manually.
232
+	if n['name_auto_color'].pressed:
233
+		if characters.size():
234
+			preview_dialog.get_node('TextBubble/NameLabel').set('custom_colors/font_color', characters[0]['color'])
235
+	
188 236
 	# maintaining the preview panel big enough for the dialog box
189
-
190 237
 	n['preview_panel'].rect_min_size.y = preview_dialog.current_theme.get_value('box', 'size', Vector2(910, 167)).y + 90 + preview_dialog.current_theme.get_value('box', 'bottom_gap', 40)
191 238
 	n['preview_panel'].rect_size.y = 0
192 239
 
@@ -324,3 +371,46 @@ func _on_Alignment_item_selected(index):
324 371
 
325 372
 func _on_Preview_text_changed():
326 373
 	DialogicResources.set_theme_value(current_theme, 'text', 'preview', n['text_preview'].text)
374
+
375
+
376
+func _on_name_auto_color_toggled(button_pressed):
377
+	DialogicResources.set_theme_value(current_theme, 'name', 'auto_color', button_pressed)
378
+
379
+
380
+func _on_name_background_visible_toggled(button_pressed):
381
+	DialogicResources.set_theme_value(current_theme, 'name', 'background_visible', button_pressed)
382
+
383
+
384
+func _on_name_background_color_changed(color):
385
+	DialogicResources.set_theme_value(current_theme, 'name', 'background', '#' + color.to_html())
386
+
387
+
388
+func _on_name_image_visible_toggled(button_pressed):
389
+	DialogicResources.set_theme_value(current_theme, 'name', 'image_visible', button_pressed)
390
+
391
+
392
+func _on_name_image_pressed():
393
+	editor_reference.godot_dialog("*.png")
394
+	editor_reference.godot_dialog_connect(self, "_on_name_texture_selected")
395
+
396
+
397
+func _on_name_texture_selected(path, target):
398
+	DialogicResources.set_theme_value(current_theme, 'name', 'image', path)
399
+	n['name_image'].text = DialogicResources.get_filename_from_path(path)
400
+
401
+
402
+func _on_shadow_visible_toggled(button_pressed):
403
+	DialogicResources.set_theme_value(current_theme, 'name', 'shadow_visible', button_pressed)
404
+
405
+
406
+func _on_name_shadow_color_changed(color):
407
+	DialogicResources.set_theme_value(current_theme, 'name', 'shadow', '#' + color.to_html())
408
+
409
+
410
+func _on_name_ShadowOffset_value_changed(_value):
411
+	DialogicResources.set_theme_value(current_theme, 'name','shadow_offset', 
412
+			Vector2(n['name_shadow_offset_x'].value,n['name_shadow_offset_y'].value))
413
+
414
+
415
+func _on_name_BottomGap_value_changed(value):
416
+	DialogicResources.set_theme_value(current_theme, 'name', 'bottom_gap', value)

+ 292
- 148
addons/dialogic/Editor/ThemeEditor/ThemeEditor.tscn View File

@@ -1,30 +1,32 @@
1
-[gd_scene load_steps=3 format=2]
1
+[gd_scene load_steps=4 format=2]
2 2
 
3 3
 [ext_resource path="res://addons/dialogic/Images/plugin-editor-icon.svg" type="Texture" id=1]
4 4
 [ext_resource path="res://addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd" type="Script" id=2]
5
+[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/SectionTitle.tscn" type="PackedScene" id=3]
5 6
 
6 7
 [node name="ThemeEditor" type="ScrollContainer"]
7 8
 anchor_right = 1.0
8 9
 anchor_bottom = 1.0
10
+margin_right = 261.0
9 11
 script = ExtResource( 2 )
10 12
 __meta__ = {
11 13
 "_edit_use_anchors_": false
12 14
 }
13 15
 
14 16
 [node name="VBoxContainer" type="VBoxContainer" parent="."]
15
-margin_right = 1048.0
16
-margin_bottom = 623.0
17
+margin_right = 1273.0
18
+margin_bottom = 701.0
17 19
 size_flags_horizontal = 3
18 20
 size_flags_vertical = 3
19 21
 custom_constants/separation = 15
20 22
 
21 23
 [node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
22
-margin_right = 1048.0
23
-margin_bottom = 218.0
24
+margin_right = 1273.0
25
+margin_bottom = 296.0
24 26
 
25 27
 [node name="Text" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
26 28
 margin_right = 316.0
27
-margin_bottom = 218.0
29
+margin_bottom = 296.0
28 30
 size_flags_horizontal = 3
29 31
 size_flags_vertical = 3
30 32
 __meta__ = {
@@ -169,10 +171,257 @@ text = "Left"
169 171
 items = [ "Left", null, false, 0, null, "Center", null, false, 1, null, "Right", null, false, 2, null ]
170 172
 selected = 0
171 173
 
172
-[node name="DialogBox" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
174
+[node name="Glossary" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
173 175
 margin_left = 320.0
174
-margin_right = 614.0
175
-margin_bottom = 218.0
176
+margin_right = 635.0
177
+margin_bottom = 296.0
178
+size_flags_horizontal = 3
179
+size_flags_vertical = 3
180
+__meta__ = {
181
+"_edit_use_anchors_": false
182
+}
183
+
184
+[node name="Character Name" parent="VBoxContainer/HBoxContainer2/Glossary" instance=ExtResource( 3 )]
185
+margin_right = 315.0
186
+
187
+[node name="GridContainer2" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
188
+margin_top = 34.0
189
+margin_right = 315.0
190
+margin_bottom = 204.0
191
+columns = 2
192
+
193
+[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
194
+margin_top = 5.0
195
+margin_right = 126.0
196
+margin_bottom = 19.0
197
+text = "Background Color"
198
+
199
+[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
200
+margin_left = 130.0
201
+margin_right = 288.0
202
+margin_bottom = 24.0
203
+
204
+[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2"]
205
+margin_right = 24.0
206
+margin_bottom = 24.0
207
+
208
+[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2"]
209
+margin_left = 28.0
210
+margin_right = 158.0
211
+margin_bottom = 24.0
212
+size_flags_horizontal = 3
213
+
214
+[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
215
+margin_top = 33.0
216
+margin_right = 126.0
217
+margin_bottom = 47.0
218
+text = "Background Texture"
219
+
220
+[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
221
+margin_left = 130.0
222
+margin_top = 28.0
223
+margin_right = 288.0
224
+margin_bottom = 52.0
225
+
226
+[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3"]
227
+margin_right = 24.0
228
+margin_bottom = 24.0
229
+pressed = true
230
+
231
+[node name="BackgroundTextureButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3"]
232
+margin_left = 28.0
233
+margin_right = 158.0
234
+margin_bottom = 24.0
235
+size_flags_horizontal = 3
236
+text = "background-2"
237
+
238
+[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
239
+margin_top = 64.0
240
+margin_right = 126.0
241
+margin_bottom = 78.0
242
+text = "Shadow"
243
+
244
+[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
245
+margin_left = 130.0
246
+margin_top = 56.0
247
+margin_right = 288.0
248
+margin_bottom = 86.0
249
+
250
+[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4"]
251
+margin_right = 24.0
252
+margin_bottom = 30.0
253
+
254
+[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4"]
255
+margin_left = 28.0
256
+margin_right = 158.0
257
+margin_bottom = 30.0
258
+rect_min_size = Vector2( 50, 30 )
259
+size_flags_horizontal = 3
260
+color = Color( 0, 0, 0, 0.619608 )
261
+
262
+[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
263
+margin_top = 95.0
264
+margin_right = 126.0
265
+margin_bottom = 109.0
266
+text = "Shadow Offset"
267
+
268
+[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
269
+margin_left = 130.0
270
+margin_top = 90.0
271
+margin_right = 288.0
272
+margin_bottom = 114.0
273
+custom_constants/separation = 10
274
+
275
+[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer"]
276
+margin_right = 74.0
277
+margin_bottom = 24.0
278
+value = 2.0
279
+rounded = true
280
+allow_lesser = true
281
+prefix = "X"
282
+
283
+[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer"]
284
+margin_left = 84.0
285
+margin_right = 158.0
286
+margin_bottom = 24.0
287
+value = 2.0
288
+rounded = true
289
+allow_lesser = true
290
+prefix = "Y"
291
+
292
+[node name="Label8" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
293
+margin_top = 123.0
294
+margin_right = 126.0
295
+margin_bottom = 137.0
296
+text = "Bottom gap"
297
+
298
+[node name="HBoxContainer5" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
299
+margin_left = 130.0
300
+margin_top = 118.0
301
+margin_right = 288.0
302
+margin_bottom = 142.0
303
+
304
+[node name="BottomGap" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5"]
305
+margin_right = 74.0
306
+margin_bottom = 24.0
307
+max_value = 999.0
308
+value = 48.0
309
+allow_greater = true
310
+allow_lesser = true
311
+
312
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
313
+margin_top = 151.0
314
+margin_right = 126.0
315
+margin_bottom = 165.0
316
+text = "Auto color"
317
+
318
+[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
319
+margin_left = 130.0
320
+margin_top = 146.0
321
+margin_right = 288.0
322
+margin_bottom = 170.0
323
+
324
+[node name="Glossary Panel" parent="VBoxContainer/HBoxContainer2/Glossary" instance=ExtResource( 3 )]
325
+margin_top = 208.0
326
+margin_right = 315.0
327
+margin_bottom = 238.0
328
+
329
+[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
330
+margin_top = 242.0
331
+margin_right = 315.0
332
+margin_bottom = 296.0
333
+size_flags_horizontal = 3
334
+custom_constants/hseparation = 10
335
+columns = 2
336
+
337
+[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
338
+margin_top = 3.0
339
+margin_right = 210.0
340
+margin_bottom = 17.0
341
+size_flags_horizontal = 3
342
+text = "Font"
343
+
344
+[node name="FontButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
345
+margin_left = 220.0
346
+margin_right = 315.0
347
+margin_bottom = 20.0
348
+size_flags_vertical = 4
349
+text = "GlossaryFont"
350
+
351
+[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
352
+margin_top = 32.0
353
+margin_right = 210.0
354
+margin_bottom = 46.0
355
+text = "Color"
356
+
357
+[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
358
+margin_left = 220.0
359
+margin_top = 24.0
360
+margin_right = 315.0
361
+margin_bottom = 54.0
362
+rect_min_size = Vector2( 50, 30 )
363
+color = Color( 0.215686, 0.654902, 0.67451, 1 )
364
+
365
+[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
366
+visible = false
367
+margin_top = 66.0
368
+margin_right = 141.0
369
+margin_bottom = 80.0
370
+text = "Shadow"
371
+
372
+[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
373
+visible = false
374
+margin_top = 58.0
375
+margin_right = 213.0
376
+margin_bottom = 88.0
377
+
378
+[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
379
+margin_right = 24.0
380
+margin_bottom = 30.0
381
+
382
+[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
383
+margin_left = 28.0
384
+margin_right = 213.0
385
+margin_bottom = 30.0
386
+rect_min_size = Vector2( 50, 30 )
387
+size_flags_horizontal = 3
388
+color = Color( 0, 0, 0, 0.619608 )
389
+
390
+[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
391
+visible = false
392
+margin_top = 63.0
393
+margin_right = 141.0
394
+margin_bottom = 77.0
395
+text = "S, Offset"
396
+
397
+[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
398
+visible = false
399
+margin_top = 58.0
400
+margin_right = 213.0
401
+margin_bottom = 82.0
402
+custom_constants/separation = 10
403
+
404
+[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
405
+margin_right = 74.0
406
+margin_bottom = 24.0
407
+value = 2.0
408
+rounded = true
409
+allow_lesser = true
410
+prefix = "X"
411
+
412
+[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
413
+margin_left = 84.0
414
+margin_right = 158.0
415
+margin_bottom = 24.0
416
+value = 2.0
417
+rounded = true
418
+allow_lesser = true
419
+prefix = "Y"
420
+
421
+[node name="DialogBox" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
422
+margin_left = 639.0
423
+margin_right = 954.0
424
+margin_bottom = 296.0
176 425
 size_flags_horizontal = 3
177 426
 size_flags_vertical = 3
178 427
 __meta__ = {
@@ -180,7 +429,7 @@ __meta__ = {
180 429
 }
181 430
 
182 431
 [node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/DialogBox"]
183
-margin_right = 294.0
432
+margin_right = 315.0
184 433
 margin_bottom = 30.0
185 434
 rect_min_size = Vector2( 0, 30 )
186 435
 
@@ -194,7 +443,7 @@ __meta__ = {
194 443
 
195 444
 [node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/DialogBox"]
196 445
 margin_top = 34.0
197
-margin_right = 294.0
446
+margin_right = 315.0
198 447
 margin_bottom = 218.0
199 448
 size_flags_horizontal = 3
200 449
 custom_constants/hseparation = 10
@@ -359,9 +608,9 @@ items = [ "[Select Action]", null, false, 0, null, "ui_accept", null, false, 1,
359 608
 selected = 0
360 609
 
361 610
 [node name="ButtonStyle" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
362
-margin_left = 618.0
363
-margin_right = 906.0
364
-margin_bottom = 218.0
611
+margin_left = 958.0
612
+margin_right = 1273.0
613
+margin_bottom = 296.0
365 614
 size_flags_horizontal = 3
366 615
 size_flags_vertical = 3
367 616
 __meta__ = {
@@ -369,7 +618,7 @@ __meta__ = {
369 618
 }
370 619
 
371 620
 [node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/ButtonStyle"]
372
-margin_right = 288.0
621
+margin_right = 315.0
373 622
 margin_bottom = 30.0
374 623
 rect_min_size = Vector2( 0, 30 )
375 624
 
@@ -383,7 +632,7 @@ __meta__ = {
383 632
 
384 633
 [node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle"]
385 634
 margin_top = 34.0
386
-margin_right = 288.0
635
+margin_right = 315.0
387 636
 margin_bottom = 170.0
388 637
 size_flags_horizontal = 3
389 638
 custom_constants/hseparation = 10
@@ -505,125 +754,10 @@ value = 5.0
505 754
 rounded = true
506 755
 allow_lesser = true
507 756
 
508
-[node name="Glossary" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
509
-margin_left = 910.0
510
-margin_right = 1048.0
511
-margin_bottom = 218.0
512
-size_flags_horizontal = 3
513
-size_flags_vertical = 3
514
-__meta__ = {
515
-"_edit_use_anchors_": false
516
-}
517
-
518
-[node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/Glossary"]
519
-margin_right = 138.0
520
-margin_bottom = 30.0
521
-rect_min_size = Vector2( 0, 30 )
522
-
523
-[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/PanelContainer"]
524
-margin_right = 40.0
525
-margin_bottom = 14.0
526
-text = "Glossary Panel"
527
-__meta__ = {
528
-"_edit_use_anchors_": false
529
-}
530
-
531
-[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
532
-margin_top = 34.0
533
-margin_right = 138.0
534
-margin_bottom = 88.0
535
-size_flags_horizontal = 3
536
-custom_constants/hseparation = 10
537
-columns = 2
538
-
539
-[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
540
-margin_top = 3.0
541
-margin_right = 33.0
542
-margin_bottom = 17.0
543
-size_flags_horizontal = 3
544
-text = "Font"
545
-
546
-[node name="FontButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
547
-margin_left = 43.0
548
-margin_right = 138.0
549
-margin_bottom = 20.0
550
-size_flags_vertical = 4
551
-text = "GlossaryFont"
552
-
553
-[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
554
-margin_top = 32.0
555
-margin_right = 33.0
556
-margin_bottom = 46.0
557
-text = "Color"
558
-
559
-[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
560
-margin_left = 43.0
561
-margin_top = 24.0
562
-margin_right = 138.0
563
-margin_bottom = 54.0
564
-rect_min_size = Vector2( 50, 30 )
565
-color = Color( 0.215686, 0.654902, 0.67451, 1 )
566
-
567
-[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
568
-visible = false
569
-margin_top = 66.0
570
-margin_right = 141.0
571
-margin_bottom = 80.0
572
-text = "Shadow"
573
-
574
-[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
575
-visible = false
576
-margin_top = 58.0
577
-margin_right = 213.0
578
-margin_bottom = 88.0
579
-
580
-[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
581
-margin_right = 24.0
582
-margin_bottom = 30.0
583
-
584
-[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
585
-margin_left = 28.0
586
-margin_right = 213.0
587
-margin_bottom = 30.0
588
-rect_min_size = Vector2( 50, 30 )
589
-size_flags_horizontal = 3
590
-color = Color( 0, 0, 0, 0.619608 )
591
-
592
-[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
593
-visible = false
594
-margin_top = 63.0
595
-margin_right = 141.0
596
-margin_bottom = 77.0
597
-text = "S, Offset"
598
-
599
-[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
600
-visible = false
601
-margin_top = 58.0
602
-margin_right = 213.0
603
-margin_bottom = 82.0
604
-custom_constants/separation = 10
605
-
606
-[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
607
-margin_right = 74.0
608
-margin_bottom = 24.0
609
-value = 2.0
610
-rounded = true
611
-allow_lesser = true
612
-prefix = "X"
613
-
614
-[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
615
-margin_left = 84.0
616
-margin_right = 158.0
617
-margin_bottom = 24.0
618
-value = 2.0
619
-rounded = true
620
-allow_lesser = true
621
-prefix = "Y"
622
-
623 757
 [node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
624
-margin_top = 233.0
625
-margin_right = 1048.0
626
-margin_bottom = 293.0
758
+margin_top = 311.0
759
+margin_right = 1273.0
760
+margin_bottom = 371.0
627 761
 custom_constants/separation = 10
628 762
 
629 763
 [node name="PreviewButton" type="Button" parent="VBoxContainer/HBoxContainer3"]
@@ -634,7 +768,7 @@ icon = ExtResource( 1 )
634 768
 
635 769
 [node name="TextEdit" type="TextEdit" parent="VBoxContainer/HBoxContainer3"]
636 770
 margin_left = 162.0
637
-margin_right = 1048.0
771
+margin_right = 1273.0
638 772
 margin_bottom = 60.0
639 773
 rect_min_size = Vector2( 400, 60 )
640 774
 size_flags_horizontal = 3
@@ -643,18 +777,18 @@ text = "This is preview text. You can use  [color=#A5EFAC]BBCode[/color] to styl
643 777
 wrap_enabled = true
644 778
 
645 779
 [node name="Panel" type="Panel" parent="VBoxContainer"]
646
-margin_top = 308.0
647
-margin_right = 1048.0
648
-margin_bottom = 608.0
780
+margin_top = 386.0
781
+margin_right = 1273.0
782
+margin_bottom = 686.0
649 783
 rect_min_size = Vector2( 0, 300 )
650 784
 
651 785
 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
652
-margin_top = 623.0
653
-margin_right = 1048.0
654
-margin_bottom = 623.0
786
+margin_top = 701.0
787
+margin_right = 1273.0
788
+margin_bottom = 701.0
655 789
 
656 790
 [node name="Control" type="Control" parent="VBoxContainer/HBoxContainer"]
657
-margin_right = 1048.0
791
+margin_right = 1273.0
658 792
 size_flags_horizontal = 3
659 793
 size_flags_vertical = 3
660 794
 
@@ -666,6 +800,22 @@ size_flags_vertical = 3
666 800
 [connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
667 801
 [connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/TextSpeed" to="." method="_on_textSpeed_value_changed"]
668 802
 [connection signal="item_selected" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer3/Alignment" to="." method="_on_Alignment_item_selected"]
803
+[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/CheckBox" to="." method="_on_name_background_visible_toggled"]
804
+[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/ColorPickerButton" to="." method="_on_name_background_color_changed"]
805
+[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/CheckBox" to="." method="_on_name_image_visible_toggled"]
806
+[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/BackgroundTextureButton" to="." method="_on_name_image_pressed"]
807
+[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/CheckBoxShadow" to="." method="_on_shadow_visible_toggled"]
808
+[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/ColorPickerButtonShadow" to="." method="_on_name_shadow_color_changed"]
809
+[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetX" to="." method="_on_name_ShadowOffset_value_changed"]
810
+[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetY" to="." method="_on_name_ShadowOffset_value_changed"]
811
+[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5/BottomGap" to="." method="_on_name_BottomGap_value_changed"]
812
+[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/CheckBox" to="." method="_on_name_auto_color_toggled"]
813
+[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/FontButton" to="." method="_on_GlossaryFontButton_pressed"]
814
+[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/ColorPickerButton" to="." method="_on_GlossaryColorPicker_color_changed"]
815
+[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/CheckBoxShadow" to="." method="_on_CheckBoxShadow_toggled"]
816
+[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/ColorPickerButtonShadow" to="." method="_on_ColorPickerButtonShadow_color_changed"]
817
+[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetX" to="." method="_on_ShadowOffset_value_changed"]
818
+[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
669 819
 [connection signal="toggled" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/CheckBox" to="." method="_on_BackgroundColor_CheckBox_toggled"]
670 820
 [connection signal="color_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/ColorPickerButton" to="." method="_on_BackgroundColor_ColorPickerButton_color_changed"]
671 821
 [connection signal="toggled" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3/CheckBox" to="." method="_on_BackgroundTexture_CheckBox_toggled"]
@@ -687,11 +837,5 @@ size_flags_vertical = 3
687 837
 [connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetV" to="." method="_on_ButtonOffset_value_changed"]
688 838
 [connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetH" to="." method="_on_ButtonOffset_value_changed"]
689 839
 [connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/VerticalSeparation" to="." method="_on_VerticalSeparation_value_changed"]
690
-[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/FontButton" to="." method="_on_GlossaryFontButton_pressed"]
691
-[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/ColorPickerButton" to="." method="_on_GlossaryColorPicker_color_changed"]
692
-[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/CheckBoxShadow" to="." method="_on_CheckBoxShadow_toggled"]
693
-[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/ColorPickerButtonShadow" to="." method="_on_ColorPickerButtonShadow_color_changed"]
694
-[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetX" to="." method="_on_ShadowOffset_value_changed"]
695
-[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
696 840
 [connection signal="pressed" from="VBoxContainer/HBoxContainer3/PreviewButton" to="." method="_on_PreviewButton_pressed"]
697 841
 [connection signal="text_changed" from="VBoxContainer/HBoxContainer3/TextEdit" to="." method="_on_Preview_text_changed"]

+ 3
- 1
addons/dialogic/Editor/TimelineEditor/TimelineEditor.gd View File

@@ -172,6 +172,8 @@ func load_timeline(filename: String):
172 172
 				create_event("CharacterJoinBlock", i)
173 173
 			{'audio', 'file'}:
174 174
 				create_event("AudioBlock", i)
175
+			{'background-music', 'file'}:
176
+				create_event("BackgroundMusic", i)
175 177
 			{'question', 'options'}:
176 178
 				create_event("Question", i)
177 179
 			{'choice'}:
@@ -192,7 +194,7 @@ func load_timeline(filename: String):
192 194
 				create_event("WaitSeconds", i)
193 195
 			{'condition', 'definition', 'value'}:
194 196
 				create_event("IfCondition", i)
195
-			{'set_value', 'definition'}:
197
+			{'set_value', 'definition', ..}:
196 198
 				create_event("SetValue", i)
197 199
 			{'set_theme'}:
198 200
 				create_event("SetTheme", i)

+ 67
- 59
addons/dialogic/Editor/TimelineEditor/TimelineEditor.tscn View File

@@ -10,7 +10,7 @@
10 10
 [ext_resource path="res://addons/dialogic/Images/question.svg" type="Texture" id=8]
11 11
 [ext_resource path="res://addons/dialogic/Images/end-choice.svg" type="Texture" id=9]
12 12
 [ext_resource path="res://addons/dialogic/Images/change-timeline.svg" type="Texture" id=10]
13
-[ext_resource path="res://addons/dialogic/Images/ListSelect.svg" type="Texture" id=11]
13
+[ext_resource path="res://addons/dialogic/Images/Resources/definition.svg" type="Texture" id=11]
14 14
 [ext_resource path="res://addons/dialogic/Images/choice.svg" type="Texture" id=12]
15 15
 [ext_resource path="res://addons/dialogic/Images/tutorials/arrow-down.svg" type="Texture" id=13]
16 16
 [ext_resource path="res://addons/dialogic/Images/Wait.svg" type="Texture" id=14]
@@ -54,7 +54,7 @@ __meta__ = {
54 54
 }
55 55
 
56 56
 [node name="TimelineArea" type="ScrollContainer" parent="."]
57
-margin_right = 826.0
57
+margin_right = 816.0
58 58
 margin_bottom = 600.0
59 59
 size_flags_horizontal = 3
60 60
 size_flags_vertical = 3
@@ -66,7 +66,7 @@ __meta__ = {
66 66
 [node name="TimeLine" type="VBoxContainer" parent="TimelineArea"]
67 67
 margin_left = 5.0
68 68
 margin_top = 5.0
69
-margin_right = 821.0
69
+margin_right = 811.0
70 70
 margin_bottom = 595.0
71 71
 grow_horizontal = 2
72 72
 grow_vertical = 2
@@ -74,14 +74,14 @@ size_flags_horizontal = 3
74 74
 size_flags_vertical = 3
75 75
 
76 76
 [node name="ScrollContainer" type="ScrollContainer" parent="."]
77
-margin_left = 834.0
77
+margin_left = 824.0
78 78
 margin_right = 1024.0
79 79
 margin_bottom = 600.0
80
-rect_min_size = Vector2( 190, 0 )
80
+rect_min_size = Vector2( 200, 0 )
81 81
 
82 82
 [node name="EventContainer" type="VBoxContainer" parent="ScrollContainer"]
83
-margin_right = 178.0
84
-margin_bottom = 664.0
83
+margin_right = 188.0
84
+margin_bottom = 702.0
85 85
 size_flags_horizontal = 3
86 86
 size_flags_vertical = 3
87 87
 __meta__ = {
@@ -89,13 +89,13 @@ __meta__ = {
89 89
 }
90 90
 
91 91
 [node name="EventsWarning" type="PanelContainer" parent="ScrollContainer/EventContainer"]
92
-margin_right = 178.0
92
+margin_right = 188.0
93 93
 margin_bottom = 68.0
94 94
 custom_styles/panel = SubResource( 2 )
95 95
 
96 96
 [node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/EventContainer/EventsWarning"]
97 97
 margin_top = 10.0
98
-margin_right = 172.0
98
+margin_right = 182.0
99 99
 margin_bottom = 58.0
100 100
 size_flags_horizontal = 3
101 101
 size_flags_vertical = 3
@@ -112,7 +112,7 @@ stretch_mode = 4
112 112
 
113 113
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/EventsWarning/HBoxContainer"]
114 114
 margin_left = 44.0
115
-margin_right = 172.0
115
+margin_right = 182.0
116 116
 margin_bottom = 48.0
117 117
 rect_min_size = Vector2( 100, 0 )
118 118
 size_flags_horizontal = 3
@@ -123,7 +123,7 @@ autowrap = true
123 123
 
124 124
 [node name="HBoxContainer6" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
125 125
 margin_top = 72.0
126
-margin_right = 178.0
126
+margin_right = 188.0
127 127
 margin_bottom = 86.0
128 128
 
129 129
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer6"]
@@ -133,13 +133,13 @@ text = "Main Events"
133 133
 
134 134
 [node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer6"]
135 135
 margin_left = 81.0
136
-margin_right = 178.0
136
+margin_right = 188.0
137 137
 margin_bottom = 14.0
138 138
 size_flags_horizontal = 3
139 139
 
140 140
 [node name="TextBlock" type="Button" parent="ScrollContainer/EventContainer"]
141 141
 margin_top = 90.0
142
-margin_right = 178.0
142
+margin_right = 188.0
143 143
 margin_bottom = 118.0
144 144
 text = "  Text Event"
145 145
 icon = ExtResource( 2 )
@@ -147,7 +147,7 @@ align = 0
147 147
 
148 148
 [node name="CharacterJoinBlock" type="Button" parent="ScrollContainer/EventContainer"]
149 149
 margin_top = 122.0
150
-margin_right = 178.0
150
+margin_right = 188.0
151 151
 margin_bottom = 150.0
152 152
 text = "  Character Join"
153 153
 icon = ExtResource( 1 )
@@ -155,7 +155,7 @@ align = 0
155 155
 
156 156
 [node name="CharacterLeaveBlock" type="Button" parent="ScrollContainer/EventContainer"]
157 157
 margin_top = 154.0
158
-margin_right = 178.0
158
+margin_right = 188.0
159 159
 margin_bottom = 182.0
160 160
 text = "  Character Leave"
161 161
 icon = ExtResource( 7 )
@@ -163,7 +163,7 @@ align = 0
163 163
 
164 164
 [node name="HBoxContainer5" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
165 165
 margin_top = 186.0
166
-margin_right = 178.0
166
+margin_right = 188.0
167 167
 margin_bottom = 200.0
168 168
 
169 169
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer5"]
@@ -173,13 +173,13 @@ text = "Logic"
173 173
 
174 174
 [node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer5"]
175 175
 margin_left = 37.0
176
-margin_right = 178.0
176
+margin_right = 188.0
177 177
 margin_bottom = 14.0
178 178
 size_flags_horizontal = 3
179 179
 
180 180
 [node name="ButtonQuestion" type="Button" parent="ScrollContainer/EventContainer"]
181 181
 margin_top = 204.0
182
-margin_right = 178.0
182
+margin_right = 188.0
183 183
 margin_bottom = 232.0
184 184
 text = "  Question"
185 185
 icon = ExtResource( 8 )
@@ -187,7 +187,7 @@ align = 0
187 187
 
188 188
 [node name="Choice" type="Button" parent="ScrollContainer/EventContainer"]
189 189
 margin_top = 236.0
190
-margin_right = 178.0
190
+margin_right = 188.0
191 191
 margin_bottom = 264.0
192 192
 text = "  Choice"
193 193
 icon = ExtResource( 12 )
@@ -195,7 +195,7 @@ align = 0
195 195
 
196 196
 [node name="IfCondition" type="Button" parent="ScrollContainer/EventContainer"]
197 197
 margin_top = 268.0
198
-margin_right = 178.0
198
+margin_right = 188.0
199 199
 margin_bottom = 296.0
200 200
 text = " Condition"
201 201
 icon = ExtResource( 5 )
@@ -203,7 +203,7 @@ align = 0
203 203
 
204 204
 [node name="EndBranch" type="Button" parent="ScrollContainer/EventContainer"]
205 205
 margin_top = 300.0
206
-margin_right = 178.0
206
+margin_right = 188.0
207 207
 margin_bottom = 328.0
208 208
 text = "  End Branch"
209 209
 icon = ExtResource( 9 )
@@ -211,16 +211,16 @@ align = 0
211 211
 
212 212
 [node name="SetValue" type="Button" parent="ScrollContainer/EventContainer"]
213 213
 margin_top = 332.0
214
-margin_right = 178.0
215
-margin_bottom = 354.0
214
+margin_right = 188.0
215
+margin_bottom = 360.0
216 216
 text = "  Set Value"
217 217
 icon = ExtResource( 11 )
218 218
 align = 0
219 219
 
220 220
 [node name="HBoxContainer3" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
221
-margin_top = 358.0
222
-margin_right = 178.0
223
-margin_bottom = 372.0
221
+margin_top = 364.0
222
+margin_right = 188.0
223
+margin_bottom = 378.0
224 224
 
225 225
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer3"]
226 226
 margin_right = 56.0
@@ -229,55 +229,55 @@ text = "Timeline"
229 229
 
230 230
 [node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer3"]
231 231
 margin_left = 60.0
232
-margin_right = 178.0
232
+margin_right = 188.0
233 233
 margin_bottom = 14.0
234 234
 size_flags_horizontal = 3
235 235
 
236 236
 [node name="ChangeTimeline" type="Button" parent="ScrollContainer/EventContainer"]
237
-margin_top = 376.0
238
-margin_right = 178.0
239
-margin_bottom = 404.0
237
+margin_top = 382.0
238
+margin_right = 188.0
239
+margin_bottom = 410.0
240 240
 hint_tooltip = "This will instantly teleport you to the start of the desired timeline."
241 241
 text = "  Change Timeline"
242 242
 icon = ExtResource( 10 )
243 243
 align = 0
244 244
 
245 245
 [node name="SceneEvent" type="Button" parent="ScrollContainer/EventContainer"]
246
-margin_top = 408.0
247
-margin_right = 178.0
248
-margin_bottom = 436.0
246
+margin_top = 414.0
247
+margin_right = 188.0
248
+margin_bottom = 442.0
249 249
 text = "  Scene Event"
250 250
 icon = ExtResource( 4 )
251 251
 align = 0
252 252
 
253 253
 [node name="CloseDialog" type="Button" parent="ScrollContainer/EventContainer"]
254
-margin_top = 440.0
255
-margin_right = 178.0
256
-margin_bottom = 468.0
254
+margin_top = 446.0
255
+margin_right = 188.0
256
+margin_bottom = 474.0
257 257
 text = "  Close Dialog"
258 258
 icon = ExtResource( 6 )
259 259
 align = 0
260 260
 
261 261
 [node name="WaitSeconds" type="Button" parent="ScrollContainer/EventContainer"]
262
-margin_top = 472.0
263
-margin_right = 178.0
264
-margin_bottom = 500.0
262
+margin_top = 478.0
263
+margin_right = 188.0
264
+margin_bottom = 506.0
265 265
 text = "  Wait Seconds"
266 266
 icon = ExtResource( 14 )
267 267
 align = 0
268 268
 
269 269
 [node name="SetTheme" type="Button" parent="ScrollContainer/EventContainer"]
270
-margin_top = 504.0
271
-margin_right = 178.0
272
-margin_bottom = 532.0
270
+margin_top = 510.0
271
+margin_right = 188.0
272
+margin_bottom = 538.0
273 273
 text = "  Set Theme"
274 274
 icon = ExtResource( 18 )
275 275
 align = 0
276 276
 
277 277
 [node name="HBoxContainer4" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
278
-margin_top = 536.0
279
-margin_right = 178.0
280
-margin_bottom = 550.0
278
+margin_top = 542.0
279
+margin_right = 188.0
280
+margin_bottom = 556.0
281 281
 
282 282
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer4"]
283 283
 margin_right = 37.0
@@ -286,22 +286,30 @@ text = "Audio"
286 286
 
287 287
 [node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer4"]
288 288
 margin_left = 41.0
289
-margin_right = 178.0
289
+margin_right = 188.0
290 290
 margin_bottom = 14.0
291 291
 size_flags_horizontal = 3
292 292
 
293 293
 [node name="AudioBlock" type="Button" parent="ScrollContainer/EventContainer"]
294
-margin_top = 554.0
295
-margin_right = 178.0
296
-margin_bottom = 582.0
294
+margin_top = 560.0
295
+margin_right = 188.0
296
+margin_bottom = 588.0
297 297
 text = "  Audio Event"
298 298
 icon = ExtResource( 3 )
299 299
 align = 0
300 300
 
301
+[node name="BackgroundMusic" type="Button" parent="ScrollContainer/EventContainer"]
302
+margin_top = 592.0
303
+margin_right = 188.0
304
+margin_bottom = 620.0
305
+text = "  Background Music"
306
+icon = ExtResource( 3 )
307
+align = 0
308
+
301 309
 [node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
302
-margin_top = 586.0
303
-margin_right = 178.0
304
-margin_bottom = 600.0
310
+margin_top = 624.0
311
+margin_right = 188.0
312
+margin_bottom = 638.0
305 313
 
306 314
 [node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer"]
307 315
 margin_right = 39.0
@@ -310,22 +318,22 @@ text = "Godot"
310 318
 
311 319
 [node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer"]
312 320
 margin_left = 43.0
313
-margin_right = 178.0
321
+margin_right = 188.0
314 322
 margin_bottom = 14.0
315 323
 size_flags_horizontal = 3
316 324
 
317 325
 [node name="EmitSignal" type="Button" parent="ScrollContainer/EventContainer"]
318
-margin_top = 604.0
319
-margin_right = 178.0
320
-margin_bottom = 632.0
326
+margin_top = 642.0
327
+margin_right = 188.0
328
+margin_bottom = 670.0
321 329
 text = "  Emit Signal"
322 330
 icon = ExtResource( 16 )
323 331
 align = 0
324 332
 
325 333
 [node name="ChangeScene" type="Button" parent="ScrollContainer/EventContainer"]
326
-margin_top = 636.0
327
-margin_right = 178.0
328
-margin_bottom = 664.0
334
+margin_top = 674.0
335
+margin_right = 188.0
336
+margin_bottom = 702.0
329 337
 hint_tooltip = "This will instantly change
330 338
 the current scene."
331 339
 text = "  Change Scene"

+ 0
- 1
addons/dialogic/Images/ListSelect.svg View File

@@ -1 +0,0 @@
1
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v14h8.2578l-.82227-2h-5.4355v-2h4.6113l-.82227-2h-3.7891v-2h3.8867a1.5002 1.5002 0 0 1 1.0977-.49805v-.0019531a1.5002 1.5002 0 0 1 .58594.11133l.94531.38867h.48438v.19922l2 .82227v-7.0215h-11zm2 2h7v2h-7zm5 5 3.291 8 .94726-2.8203 1.8828 1.8828.94336-.94141-1.8848-1.8828 2.8203-.94726-8-3.291z" fill="#e0e0e0" fill-opacity=".99608"/></svg>

+ 3
- 0
addons/dialogic/Images/Resources/definition.svg View File

@@ -0,0 +1,3 @@
1
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+<path d="M19.2012 3.61523L17.6631 7.18359C17.3623 6.9375 17.0273 6.72559 16.6582 6.54785C16.3027 6.35645 15.9336 6.26074 15.5508 6.26074C15.25 6.26074 14.9629 6.32227 14.6895 6.44531C14.4297 6.56836 14.1904 6.73242 13.9717 6.9375C13.7529 7.14258 13.5615 7.375 13.3975 7.63477C13.2334 7.88086 13.0967 8.12695 12.9873 8.37305L12.5771 9.54199C12.8643 10.1436 13.1445 10.7178 13.418 11.2646C13.6504 11.7295 13.8896 12.2012 14.1357 12.6797C14.3818 13.1445 14.5869 13.5137 14.751 13.7871C15.0107 14.1836 15.2705 14.5938 15.5303 15.0176C15.79 15.4277 16.0771 15.8037 16.3916 16.1455C16.5283 16.2959 16.6924 16.3984 16.8838 16.4531C17.0889 16.4941 17.2734 16.5146 17.4375 16.5146C17.6973 16.5146 17.9434 16.4805 18.1758 16.4121C18.4082 16.3438 18.627 16.2549 18.832 16.1455L19.3447 16.8018C19.1533 17.1025 18.9209 17.4033 18.6475 17.7041C18.374 18.0049 18.0732 18.2783 17.7451 18.5244C17.4307 18.7705 17.0889 18.9688 16.7197 19.1191C16.3643 19.2832 16.002 19.3652 15.6328 19.3652C15.3047 19.3652 15.0107 19.3105 14.751 19.2012C14.5049 19.1055 14.2793 18.9756 14.0742 18.8115C13.8691 18.6338 13.6777 18.4287 13.5 18.1963C13.3223 17.9639 13.1377 17.7246 12.9463 17.4785C12.7959 17.2461 12.6318 16.9658 12.4541 16.6377C12.29 16.2959 12.1191 15.9473 11.9414 15.5918C11.7637 15.2363 11.5859 14.8945 11.4082 14.5664C11.2305 14.2246 11.0596 13.9375 10.8955 13.7051C10.8271 13.9375 10.7656 14.1699 10.7109 14.4023C10.6562 14.5938 10.5947 14.792 10.5264 14.9971C10.458 15.2021 10.3965 15.3594 10.3418 15.4688C10.1367 15.9062 9.87695 16.3574 9.5625 16.8223C9.24805 17.2871 8.88574 17.7109 8.47559 18.0938C8.0791 18.4629 7.6416 18.7705 7.16309 19.0166C6.68457 19.249 6.17871 19.3652 5.64551 19.3652C5.16699 19.3652 4.70215 19.2695 4.25098 19.0781C3.7998 18.9004 3.38281 18.6611 3 18.3604L4.29199 14.9561C4.72949 15.2295 5.20801 15.4756 5.72754 15.6943C6.24707 15.8994 6.7666 16.002 7.28613 16.002C7.4502 16.002 7.62109 15.9883 7.79883 15.9609C7.97656 15.9199 8.14746 15.8652 8.31152 15.7969C8.48926 15.7148 8.64648 15.6191 8.7832 15.5098C8.91992 15.3867 9.02246 15.2432 9.09082 15.0791C9.18652 14.9014 9.28906 14.6689 9.39844 14.3818C9.50781 14.0947 9.61719 13.8076 9.72656 13.5205C9.84961 13.1924 9.97266 12.8438 10.0957 12.4746L6.24023 6.30176C6.0625 6.09668 5.84375 5.93262 5.58398 5.80957C5.33789 5.67285 5.07812 5.60449 4.80469 5.60449C4.57227 5.60449 4.35352 5.65234 4.14844 5.74805C3.94336 5.83008 3.74512 5.94629 3.55371 6.09668L3 5.37891C3.19141 5.0918 3.41699 4.81152 3.67676 4.53809C3.9502 4.25098 4.24414 3.99805 4.55859 3.7793C4.87305 3.54688 5.20801 3.3623 5.56348 3.22559C5.91895 3.0752 6.28125 3 6.65039 3C7.10156 3 7.51855 3.11621 7.90137 3.34863C8.28418 3.56738 8.63965 3.84082 8.96777 4.16895C9.2959 4.49707 9.59668 4.85254 9.87012 5.23535C10.1436 5.61816 10.3896 5.97363 10.6084 6.30176C10.7178 6.45215 10.834 6.64355 10.957 6.87598C11.0938 7.09473 11.2236 7.31348 11.3467 7.53223C11.4971 7.77832 11.6406 8.04492 11.7773 8.33203C11.9141 8.00391 12.0576 7.67578 12.208 7.34766C12.3311 7.07422 12.4541 6.79395 12.5771 6.50684C12.7139 6.20605 12.8369 5.94629 12.9463 5.72754C13.1514 5.34473 13.3838 4.98926 13.6436 4.66113C13.9033 4.33301 14.1904 4.0459 14.5049 3.7998C14.833 3.55371 15.1885 3.3623 15.5713 3.22559C15.9541 3.0752 16.3711 3 16.8223 3C17.2461 3 17.6562 3.05469 18.0527 3.16406C18.4492 3.27344 18.832 3.42383 19.2012 3.61523Z" fill="white"/>
3
+</svg>

+ 34
- 0
addons/dialogic/Images/Resources/definition.svg.import View File

@@ -0,0 +1,34 @@
1
+[remap]
2
+
3
+importer="texture"
4
+type="StreamTexture"
5
+path="res://.import/definition.svg-336e1b41e3ab4ef43367e0f0bbc50c2c.stex"
6
+metadata={
7
+"vram_texture": false
8
+}
9
+
10
+[deps]
11
+
12
+source_file="res://addons/dialogic/Images/Resources/definition.svg"
13
+dest_files=[ "res://.import/definition.svg-336e1b41e3ab4ef43367e0f0bbc50c2c.stex" ]
14
+
15
+[params]
16
+
17
+compress/mode=0
18
+compress/lossy_quality=0.7
19
+compress/hdr_mode=0
20
+compress/bptc_ldr=0
21
+compress/normal_map=0
22
+flags/repeat=0
23
+flags/filter=true
24
+flags/mipmaps=false
25
+flags/anisotropic=false
26
+flags/srgb=2
27
+process/fix_alpha_border=true
28
+process/premult_alpha=false
29
+process/HDR_as_SRGB=false
30
+process/invert_color=false
31
+stream=false
32
+size_limit=0
33
+detect_3d=true
34
+svg/scale=1.0

+ 3
- 0
addons/dialogic/Images/Resources/glossary.svg View File

@@ -0,0 +1,3 @@
1
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3H18V19H4V3ZM6.33333 5.28571H15.6667V7.57143H6.33333V5.28571ZM15.6667 9.85714H6.33333V12.1429H15.6667V9.85714ZM6.33333 14.4286H15.6667V16.7143H6.33333V14.4286Z" fill="white"/>
3
+</svg>

addons/dialogic/Images/glossary.svg.import → addons/dialogic/Images/Resources/glossary.svg.import View File

@@ -2,15 +2,15 @@
2 2
 
3 3
 importer="texture"
4 4
 type="StreamTexture"
5
-path="res://.import/glossary.svg-469b641a988c9791f270a494be069208.stex"
5
+path="res://.import/glossary.svg-6fbd6bb0ce43791e7b31d146806b81c8.stex"
6 6
 metadata={
7 7
 "vram_texture": false
8 8
 }
9 9
 
10 10
 [deps]
11 11
 
12
-source_file="res://addons/dialogic/Images/glossary.svg"
13
-dest_files=[ "res://.import/glossary.svg-469b641a988c9791f270a494be069208.stex" ]
12
+source_file="res://addons/dialogic/Images/Resources/glossary.svg"
13
+dest_files=[ "res://.import/glossary.svg-6fbd6bb0ce43791e7b31d146806b81c8.stex" ]
14 14
 
15 15
 [params]
16 16
 

+ 4
- 0
addons/dialogic/Images/Resources/theme.svg View File

@@ -0,0 +1,4 @@
1
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+<path d="M2 3C2 2.44772 2.44772 2 3 2H19C19.5523 2 20 2.44772 20 3V14C20 15 19 15.5 19 15.5L9 20L11 15H3C2.44772 15 2 14.5523 2 14V3Z" fill="white"/>
3
+<path d="M8.32939 6.132C8.68939 5.972 9.12939 5.84 9.64939 5.736C10.1774 5.632 10.7214 5.58 11.2814 5.58C11.7214 5.58 12.0894 5.632 12.3854 5.736C12.6894 5.84 12.9294 5.992 13.1054 6.192C13.2814 6.384 13.4054 6.62 13.4774 6.9C13.5574 7.172 13.5974 7.476 13.5974 7.812C13.5974 8.22 13.5814 8.624 13.5494 9.024C13.5174 9.424 13.5014 9.848 13.5014 10.296C13.5014 10.6 13.5214 10.896 13.5614 11.184C13.6014 11.472 13.6654 11.748 13.7534 12.012H12.3854L12.1094 11.076H11.9654C11.7574 11.356 11.4934 11.596 11.1734 11.796C10.8534 11.996 10.4414 12.096 9.93739 12.096C9.63339 12.096 9.35339 12.052 9.09739 11.964C8.84939 11.876 8.63339 11.752 8.44939 11.592C8.27339 11.424 8.13339 11.228 8.02939 11.004C7.93339 10.78 7.88539 10.536 7.88539 10.272C7.88539 9.56 8.12139 9.024 8.59339 8.664C9.07339 8.296 9.79739 8.112 10.7654 8.112C10.9894 8.112 11.2134 8.132 11.4374 8.172C11.6614 8.204 11.8174 8.228 11.9054 8.244C11.9294 8.076 11.9414 7.932 11.9414 7.812C11.9414 7.508 11.8654 7.284 11.7134 7.14C11.5614 6.996 11.2774 6.924 10.8614 6.924C10.4774 6.924 10.1014 6.972 9.73339 7.068C9.37339 7.156 9.05339 7.268 8.77339 7.404L8.32939 6.132ZM10.5254 10.752C10.9014 10.752 11.2014 10.664 11.4254 10.488C11.6494 10.312 11.8134 10.128 11.9174 9.936V9.216C11.8774 9.2 11.8134 9.184 11.7254 9.168C11.6454 9.152 11.5534 9.136 11.4494 9.12C11.3534 9.104 11.2534 9.092 11.1494 9.084C11.0534 9.076 10.9654 9.072 10.8854 9.072C10.4534 9.072 10.1334 9.152 9.92539 9.312C9.71739 9.464 9.61339 9.656 9.61339 9.888C9.61339 10.176 9.69339 10.392 9.85339 10.536C10.0214 10.68 10.2454 10.752 10.5254 10.752Z" fill="#939393"/>
4
+</svg>

addons/dialogic/Images/ListSelect.svg.import → addons/dialogic/Images/Resources/theme.svg.import View File

@@ -2,15 +2,15 @@
2 2
 
3 3
 importer="texture"
4 4
 type="StreamTexture"
5
-path="res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.stex"
5
+path="res://.import/theme.svg-d2e167fcbacd86111397e731ff3f28eb.stex"
6 6
 metadata={
7 7
 "vram_texture": false
8 8
 }
9 9
 
10 10
 [deps]
11 11
 
12
-source_file="res://addons/dialogic/Images/ListSelect.svg"
13
-dest_files=[ "res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.stex" ]
12
+source_file="res://addons/dialogic/Images/Resources/theme.svg"
13
+dest_files=[ "res://.import/theme.svg-d2e167fcbacd86111397e731ff3f28eb.stex" ]
14 14
 
15 15
 [params]
16 16
 

+ 1
- 2
addons/dialogic/Images/Toolbar/add-character.svg View File

@@ -1,5 +1,4 @@
1 1
 <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2 2
 <path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
3
-<path d="M14.4551 7.49007C14.4551 10.2515 12.8007 11.5 10.0269 11.5C7.25308 11.5 5.5 10.2515 5.5 7.49007C5.5 4.72864 7.25308 2.99007 10.0269 2.99007C12.8007 2.99007 14.4551 4.72864 14.4551 7.49007Z" fill="white"/>
4
-<path d="M13.9282 12C12.8769 10.7526 11.5149 10 10.0269 10C6.69832 10 4 13.7661 4 18.4118C4 21 6.69832 21 10.0269 21C13.0813 21 15.605 21 16 19H15.0493V16H12.0358V12H13.9282Z" fill="white"/>
3
+<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0004 9C15.6281 8.16434 16 7.12561 16 6C16 3.23858 13.7614 1 11 1C8.23858 1 6 3.23858 6 6C6 8.0077 7.18332 9.73902 8.89057 10.5346C6.61752 11.7315 5 14.8068 5 18.4118C5 21 7.68629 21 11 21C14.0408 21 16.5533 21 16.9465 19H15V16H12V12H14.884C14.3618 11.3777 13.7627 10.8786 13.1094 10.5346C13.8593 10.1851 14.5081 9.65514 15 9.00049V9H15.0004Z" fill="white"/>
5 4
 </svg>

+ 2
- 2
addons/dialogic/Images/Toolbar/add-definition.svg View File

@@ -1,4 +1,4 @@
1 1
 <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
-<path fill-rule="evenodd" clip-rule="evenodd" d="M17 4H5V18H14V16H7V14H11V12H7V10H14V9H17V4ZM15 6H7V8H15V6Z" fill="white"/>
3
-<path d="M17 13H20V15H17V18H15V15H12V13H15V10H17V13Z" fill="#A5EFAC"/>
2
+<path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
3
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16.6631 7.18359L18.2012 3.61523C17.832 3.42383 17.4492 3.27344 17.0527 3.16406C16.6562 3.05469 16.2461 3 15.8223 3C15.3711 3 14.9541 3.0752 14.5713 3.22559C14.1885 3.3623 13.833 3.55371 13.5049 3.7998C13.1904 4.0459 12.9033 4.33301 12.6436 4.66113C12.3838 4.98926 12.1514 5.34473 11.9463 5.72754C11.8369 5.94629 11.7139 6.20605 11.5771 6.50684C11.4541 6.79395 11.3311 7.07422 11.208 7.34766C11.0576 7.67578 10.9141 8.00391 10.7773 8.33203C10.6406 8.04492 10.4971 7.77832 10.3467 7.53223C10.2236 7.31348 10.0938 7.09473 9.95703 6.87598C9.83398 6.64355 9.71777 6.45215 9.6084 6.30176C9.38965 5.97363 9.14355 5.61816 8.87012 5.23535C8.59668 4.85254 8.2959 4.49707 7.96777 4.16895C7.63965 3.84082 7.28418 3.56738 6.90137 3.34863C6.51855 3.11621 6.10156 3 5.65039 3C5.28125 3 4.91895 3.0752 4.56348 3.22559C4.20801 3.3623 3.87305 3.54688 3.55859 3.7793C3.24414 3.99805 2.9502 4.25098 2.67676 4.53809C2.41699 4.81152 2.19141 5.0918 2 5.37891L2.55371 6.09668C2.74512 5.94629 2.94336 5.83008 3.14844 5.74805C3.35352 5.65234 3.57227 5.60449 3.80469 5.60449C4.07812 5.60449 4.33789 5.67285 4.58398 5.80957C4.84375 5.93262 5.0625 6.09668 5.24023 6.30176L9.0957 12.4746C8.97266 12.8438 8.84961 13.1924 8.72656 13.5205L8.39844 14.3818C8.28906 14.6689 8.18652 14.9014 8.09082 15.0791C8.02246 15.2432 7.91992 15.3867 7.7832 15.5098C7.64648 15.6191 7.48926 15.7148 7.31152 15.7969C7.14746 15.8652 6.97656 15.9199 6.79883 15.9609C6.62109 15.9883 6.4502 16.002 6.28613 16.002C5.7666 16.002 5.24707 15.8994 4.72754 15.6943C4.20801 15.4756 3.72949 15.2295 3.29199 14.9561L2 18.3604C2.38281 18.6611 2.7998 18.9004 3.25098 19.0781C3.70215 19.2695 4.16699 19.3652 4.64551 19.3652C5.17871 19.3652 5.68457 19.249 6.16309 19.0166C6.6416 18.7705 7.0791 18.4629 7.47559 18.0938C7.88574 17.7109 8.24805 17.2871 8.5625 16.8223C8.87695 16.3574 9.13672 15.9062 9.3418 15.4688C9.39648 15.3594 9.45801 15.2021 9.52637 14.9971C9.59473 14.792 9.65625 14.5938 9.71094 14.4023C9.76562 14.1699 9.82715 13.9375 9.89551 13.7051C10.0596 13.9375 10.2305 14.2246 10.4082 14.5664C10.5859 14.8945 10.7637 15.2363 10.9414 15.5918C11.1191 15.9473 11.29 16.2959 11.4541 16.6377C11.6318 16.9658 11.7959 17.2461 11.9463 17.4785C12.1377 17.7246 12.3223 17.9639 12.5 18.1963C12.6777 18.4287 12.8691 18.6338 13.0742 18.8115C13.2793 18.9756 13.5049 19.1055 13.751 19.2012C14.0107 19.3105 14.3047 19.3652 14.6328 19.3652C15.002 19.3652 15.3643 19.2832 15.7197 19.1191C15.8102 19.0823 15.8989 19.0426 15.9861 19H15V16H12V12H12.7885C12.6631 11.753 12.5396 11.5079 12.418 11.2646C12.1445 10.7178 11.8643 10.1436 11.5771 9.54199L11.9873 8.37305C12.0967 8.12695 12.2334 7.88086 12.3975 7.63477C12.5615 7.375 12.7529 7.14258 12.9717 6.9375C13.1904 6.73242 13.4297 6.56836 13.6895 6.44531C13.9629 6.32227 14.25 6.26074 14.5508 6.26074C14.9336 6.26074 15.3027 6.35645 15.6582 6.54785C16.0273 6.72559 16.3623 6.9375 16.6631 7.18359Z" fill="white"/>
4 4
 </svg>

+ 1
- 1
addons/dialogic/Images/Toolbar/add-theme.svg View File

@@ -1,5 +1,5 @@
1 1
 <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2 2
 <path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
3
-<path d="M2 3C2 2.44772 2.44772 2 3 2H19C19.5523 2 20 2.44772 20 3V12H19V9H15V12H12V16H15V17L9 20L12 15H3C2.44772 15 2 14.5523 2 14V3Z" fill="white"/>
3
+<path d="M2 3C2 2.44772 2.44772 2 3 2H19C19.5523 2 20 2.44772 20 3V12H19V9H15V12H12V16H15V17L9 20L11 15H3C2.44772 15 2 14.5523 2 14V3Z" fill="white"/>
4 4
 <path d="M8.32939 6.132C8.68939 5.972 9.12939 5.84 9.64939 5.736C10.1774 5.632 10.7214 5.58 11.2814 5.58C11.7214 5.58 12.0894 5.632 12.3854 5.736C12.6894 5.84 12.9294 5.992 13.1054 6.192C13.2814 6.384 13.4054 6.62 13.4774 6.9C13.5574 7.172 13.5974 7.476 13.5974 7.812C13.5974 8.22 13.5814 8.624 13.5494 9.024C13.5174 9.424 13.5014 9.848 13.5014 10.296C13.5014 10.6 13.5214 10.896 13.5614 11.184C13.6014 11.472 13.6654 11.748 13.7534 12.012H12.3854L12.1094 11.076H11.9654C11.7574 11.356 11.4934 11.596 11.1734 11.796C10.8534 11.996 10.4414 12.096 9.93739 12.096C9.63339 12.096 9.35339 12.052 9.09739 11.964C8.84939 11.876 8.63339 11.752 8.44939 11.592C8.27339 11.424 8.13339 11.228 8.02939 11.004C7.93339 10.78 7.88539 10.536 7.88539 10.272C7.88539 9.56 8.12139 9.024 8.59339 8.664C9.07339 8.296 9.79739 8.112 10.7654 8.112C10.9894 8.112 11.2134 8.132 11.4374 8.172C11.6614 8.204 11.8174 8.228 11.9054 8.244C11.9294 8.076 11.9414 7.932 11.9414 7.812C11.9414 7.508 11.8654 7.284 11.7134 7.14C11.5614 6.996 11.2774 6.924 10.8614 6.924C10.4774 6.924 10.1014 6.972 9.73339 7.068C9.37339 7.156 9.05339 7.268 8.77339 7.404L8.32939 6.132ZM10.5254 10.752C10.9014 10.752 11.2014 10.664 11.4254 10.488C11.6494 10.312 11.8134 10.128 11.9174 9.936V9.216C11.8774 9.2 11.8134 9.184 11.7254 9.168C11.6454 9.152 11.5534 9.136 11.4494 9.12C11.3534 9.104 11.2534 9.092 11.1494 9.084C11.0534 9.076 10.9654 9.072 10.8854 9.072C10.4534 9.072 10.1334 9.152 9.92539 9.312C9.71739 9.464 9.61339 9.656 9.61339 9.888C9.61339 10.176 9.69339 10.392 9.85339 10.536C10.0214 10.68 10.2454 10.752 10.5254 10.752Z" fill="#939393"/>
5 5
 </svg>

+ 4
- 8
addons/dialogic/Images/Toolbar/add-timeline.svg View File

@@ -1,11 +1,7 @@
1 1
 <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
-<g clip-path="url(#clip0)">
2
+<path d="M2 3C2 2.44772 2.44772 2 3 2H19C19.5523 2 20 2.44772 20 3V4C20 4.55228 19.5523 5 19 5H3C2.44772 5 2 4.55228 2 4V3Z" fill="white"/>
3
+<path d="M2 8C2 7.44772 2.44772 7 3 7H19C19.5523 7 20 7.44772 20 8V9C20 9.55228 19.5523 10 19 10V9H15V10H3C2.44772 10 2 9.55228 2 9V8Z" fill="white"/>
4
+<path d="M2 13C2 12.4477 2.44772 12 3 12H12C12 12 12 12.4477 12 13V14C12 14.5523 12 15 12 15H3C2.44772 15 2 14.5523 2 14V13Z" fill="white"/>
5
+<path d="M2 18C2 17.4477 2.44772 17 3 17H15V19H19V17C19.5523 17 20 17.4477 20 18V19C20 19.5523 19.5523 20 19 20H3C2.44772 20 2 19.5523 2 19V18Z" fill="white"/>
3 6
 <path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
4
-<path d="M8.04639 20V18.585L9.87695 18.2705V5.32178H6.1709L5.84521 7.59033H4.18311V3.64844H17.772V7.59033H16.1323L15.7954 5.32178H12.0894V18.2705L13.9199 18.585V20H8.04639Z" fill="white"/>
5
-</g>
6
-<defs>
7
-<clipPath id="clip0">
8
-<rect width="22" height="22" fill="white"/>
9
-</clipPath>
10
-</defs>
11 7
 </svg>

+ 0
- 4
addons/dialogic/Images/glossary.svg View File

@@ -1,4 +0,0 @@
1
-<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
-<circle cx="11" cy="11" r="8" stroke="white" stroke-width="2"/>
3
-<path d="M9.752 12.456C9.704 12.008 9.724 11.632 9.812 11.328C9.9 11.024 10.02 10.768 10.172 10.56C10.332 10.352 10.508 10.18 10.7 10.044C10.892 9.9 11.072 9.764 11.24 9.636C11.416 9.508 11.56 9.376 11.672 9.24C11.792 9.096 11.852 8.924 11.852 8.724C11.852 8.444 11.768 8.228 11.6 8.076C11.44 7.916 11.144 7.836 10.712 7.836C10.576 7.836 10.424 7.852 10.256 7.884C10.096 7.916 9.936 7.96 9.776 8.016C9.616 8.072 9.46 8.136 9.308 8.208C9.164 8.28 9.04 8.356 8.936 8.436L8.288 7.188C8.616 6.972 8.992 6.792 9.416 6.648C9.848 6.504 10.372 6.432 10.988 6.432C11.796 6.432 12.432 6.616 12.896 6.984C13.368 7.352 13.604 7.848 13.604 8.472C13.604 8.904 13.544 9.256 13.424 9.528C13.312 9.792 13.164 10.016 12.98 10.2C12.804 10.376 12.612 10.532 12.404 10.668C12.204 10.796 12.012 10.936 11.828 11.088C11.652 11.232 11.504 11.412 11.384 11.628C11.272 11.836 11.216 12.112 11.216 12.456H9.752ZM9.5 14.184C9.5 13.888 9.596 13.656 9.788 13.488C9.98 13.32 10.232 13.236 10.544 13.236C10.864 13.236 11.12 13.32 11.312 13.488C11.504 13.656 11.6 13.888 11.6 14.184C11.6 14.464 11.504 14.692 11.312 14.868C11.12 15.044 10.864 15.132 10.544 15.132C10.232 15.132 9.98 15.044 9.788 14.868C9.596 14.692 9.5 14.464 9.5 14.184Z" fill="white"/>
4
-</svg>

+ 24
- 0
addons/dialogic/Nodes/BackgroundMusic.gd View File

@@ -0,0 +1,24 @@
1
+extends Control
2
+class_name DialogicBackgroundMusic
3
+
4
+onready var _anim_player := $AnimationPlayer
5
+onready var _track1 := $Track1
6
+onready var _track2 := $Track2
7
+
8
+
9
+func crossfade_to(audio_stream: AudioStream) -> void:
10
+	if _track1.playing and _track2.playing:
11
+		return
12
+	
13
+	if _track2.playing:
14
+		_track1.stream = audio_stream
15
+		_track1.play()
16
+		_anim_player.play("FadeToTrack1")
17
+	else:
18
+		_track2.stream = audio_stream
19
+		_track2.play()
20
+		_anim_player.play("FadeToTrack2")
21
+
22
+
23
+func fade_out() -> void:
24
+	_anim_player.play("FadeOut")

+ 152
- 0
addons/dialogic/Nodes/BackgroundMusic.tscn View File

@@ -0,0 +1,152 @@
1
+[gd_scene load_steps=5 format=2]
2
+
3
+[ext_resource path="res://addons/dialogic/Nodes/BackgroundMusic.gd" type="Script" id=1]
4
+
5
+
6
+[sub_resource type="Animation" id=3]
7
+resource_name = "FadeOut"
8
+tracks/0/type = "value"
9
+tracks/0/path = NodePath("Track1:volume_db")
10
+tracks/0/interp = 1
11
+tracks/0/loop_wrap = true
12
+tracks/0/imported = false
13
+tracks/0/enabled = true
14
+tracks/0/keys = {
15
+"times": PoolRealArray( 0, 0.5 ),
16
+"transitions": PoolRealArray( 5.66, 1 ),
17
+"update": 0,
18
+"values": [ 0.0, -80.0 ]
19
+}
20
+tracks/1/type = "value"
21
+tracks/1/path = NodePath("Track2:volume_db")
22
+tracks/1/interp = 1
23
+tracks/1/loop_wrap = true
24
+tracks/1/imported = false
25
+tracks/1/enabled = true
26
+tracks/1/keys = {
27
+"times": PoolRealArray( 0, 0.5 ),
28
+"transitions": PoolRealArray( 5.66, 1 ),
29
+"update": 0,
30
+"values": [ 0.0, -80.0 ]
31
+}
32
+tracks/2/type = "value"
33
+tracks/2/path = NodePath("Track2:playing")
34
+tracks/2/interp = 1
35
+tracks/2/loop_wrap = true
36
+tracks/2/imported = false
37
+tracks/2/enabled = true
38
+tracks/2/keys = {
39
+"times": PoolRealArray( 0.5 ),
40
+"transitions": PoolRealArray( 1 ),
41
+"update": 1,
42
+"values": [ false ]
43
+}
44
+tracks/3/type = "value"
45
+tracks/3/path = NodePath("Track1:playing")
46
+tracks/3/interp = 1
47
+tracks/3/loop_wrap = true
48
+tracks/3/imported = false
49
+tracks/3/enabled = true
50
+tracks/3/keys = {
51
+"times": PoolRealArray( 0.5 ),
52
+"transitions": PoolRealArray( 1 ),
53
+"update": 1,
54
+"values": [ false ]
55
+}
56
+
57
+[sub_resource type="Animation" id=1]
58
+resource_name = "FadeToTrack1"
59
+length = 0.5
60
+tracks/0/type = "value"
61
+tracks/0/path = NodePath("Track1:volume_db")
62
+tracks/0/interp = 1
63
+tracks/0/loop_wrap = true
64
+tracks/0/imported = false
65
+tracks/0/enabled = true
66
+tracks/0/keys = {
67
+"times": PoolRealArray( 0, 0.5 ),
68
+"transitions": PoolRealArray( 5.66, 1 ),
69
+"update": 0,
70
+"values": [ -80.0, 0.0 ]
71
+}
72
+tracks/1/type = "value"
73
+tracks/1/path = NodePath("Track2:volume_db")
74
+tracks/1/interp = 1
75
+tracks/1/loop_wrap = true
76
+tracks/1/imported = false
77
+tracks/1/enabled = true
78
+tracks/1/keys = {
79
+"times": PoolRealArray( 0, 0.5 ),
80
+"transitions": PoolRealArray( 5.66, 1 ),
81
+"update": 0,
82
+"values": [ 0.0, -80.0 ]
83
+}
84
+tracks/2/type = "value"
85
+tracks/2/path = NodePath("Track2:playing")
86
+tracks/2/interp = 1
87
+tracks/2/loop_wrap = true
88
+tracks/2/imported = false
89
+tracks/2/enabled = true
90
+tracks/2/keys = {
91
+"times": PoolRealArray( 0.5 ),
92
+"transitions": PoolRealArray( 1 ),
93
+"update": 1,
94
+"values": [ false ]
95
+}
96
+
97
+[sub_resource type="Animation" id=2]
98
+resource_name = "FadeToTrack2"
99
+length = 0.5
100
+tracks/0/type = "value"
101
+tracks/0/path = NodePath("Track1:volume_db")
102
+tracks/0/interp = 1
103
+tracks/0/loop_wrap = true
104
+tracks/0/imported = false
105
+tracks/0/enabled = true
106
+tracks/0/keys = {
107
+"times": PoolRealArray( 0, 0.5 ),
108
+"transitions": PoolRealArray( 5.66, 1 ),
109
+"update": 0,
110
+"values": [ 0.0, -80.0 ]
111
+}
112
+tracks/1/type = "value"
113
+tracks/1/path = NodePath("Track1:playing")
114
+tracks/1/interp = 1
115
+tracks/1/loop_wrap = true
116
+tracks/1/imported = false
117
+tracks/1/enabled = true
118
+tracks/1/keys = {
119
+"times": PoolRealArray( 0.5 ),
120
+"transitions": PoolRealArray( 1 ),
121
+"update": 1,
122
+"values": [ false ]
123
+}
124
+tracks/2/type = "value"
125
+tracks/2/path = NodePath("Track2:volume_db")
126
+tracks/2/interp = 1
127
+tracks/2/loop_wrap = true
128
+tracks/2/imported = false
129
+tracks/2/enabled = true
130
+tracks/2/keys = {
131
+"times": PoolRealArray( 0, 0.5 ),
132
+"transitions": PoolRealArray( 5.66, 1 ),
133
+"update": 0,
134
+"values": [ -80.0, 0.0 ]
135
+}
136
+
137
+[node name="BackgroundMusic" type="Control"]
138
+margin_right = 40.0
139
+margin_bottom = 40.0
140
+script = ExtResource( 1 )
141
+__meta__ = {
142
+"_edit_use_anchors_": false
143
+}
144
+
145
+[node name="Track1" type="AudioStreamPlayer" parent="."]
146
+
147
+[node name="Track2" type="AudioStreamPlayer" parent="."]
148
+
149
+[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
150
+anims/FadeOut = SubResource( 3 )
151
+anims/FadeToTrack1 = SubResource( 1 )
152
+anims/FadeToTrack2 = SubResource( 2 )

+ 49
- 17
addons/dialogic/Nodes/dialog_node.gd View File

@@ -239,6 +239,7 @@ func parse_definitions(text: String):
239 239
 	final_text = _insert_glossary_definitions(final_text)
240 240
 	return final_text
241 241
 
242
+
242 243
 func _insert_variable_definitions(text: String):
243 244
 	var final_text := text;
244 245
 	for d in definitions['variables']:
@@ -299,23 +300,29 @@ func start_text_tween():
299 300
 	$TextBubble/Tween.start()
300 301
 
301 302
 
302
-func update_name(character, color='#FFFFFF'):
303
+func update_name(character, color: Color = Color.white) -> void:
303 304
 	if character.has('name'):
304 305
 		var parsed_name = character['name']
305 306
 		if character.has('display_name'):
306 307
 			if character['display_name'] != '':
307 308
 				parsed_name = character['display_name']
308 309
 		if character.has('color'):
309
-			color = '#' + character['color'].to_html()
310
-		$TextBubble/NameLabel.bbcode_text = '[color=' + color + ']' + parsed_name + '[/color]'
310
+			color = character['color']
311
+		parsed_name = parse_definitions(parsed_name)
312
+		$TextBubble/NameLabel.visible = true
313
+		# Hack to reset the size
314
+		$TextBubble/NameLabel.rect_min_size = Vector2(0, 0)
315
+		$TextBubble/NameLabel.rect_size = Vector2(-1, 40)
316
+		# Setting the color and text
317
+		$TextBubble/NameLabel.text = parsed_name
318
+		$TextBubble/NameLabel.set('custom_colors/font_color', color)
311 319
 	else:
312
-		$TextBubble/NameLabel.bbcode_text = ''
313
-	return true
320
+		$TextBubble/NameLabel.visible = false
314 321
 
315 322
 
316 323
 func update_text(text):
317 324
 	# Updating the text and starting the animation from 0
318
-	$TextBubble/RichTextLabel.bbcode_text = self.parse_definitions(text)
325
+	$TextBubble/RichTextLabel.bbcode_text = parse_definitions(text)
319 326
 	$TextBubble/RichTextLabel.percent_visible = 0
320 327
 
321 328
 	# The call to this function needs to be deferred.
@@ -337,6 +344,7 @@ func on_timeline_end():
337 344
 		DialogicSingleton.set_current_timeline('')
338 345
 	emit_signal("event_end", "timeline")
339 346
 
347
+
340 348
 func load_dialog(skip_add = false):
341 349
 	# Emitting signals
342 350
 	if dialog_script.has('events'):
@@ -361,7 +369,8 @@ func load_dialog(skip_add = false):
361 369
 
362 370
 
363 371
 func reset_dialog_extras():
364
-	$TextBubble/NameLabel.bbcode_text = ''
372
+	$TextBubble/NameLabel.text = ''
373
+	$TextBubble/NameLabel.visible = false
365 374
 
366 375
 
367 376
 func get_character(character_id):
@@ -450,10 +459,19 @@ func event_handler(event: Dictionary):
450 459
 			go_to_next_event()
451 460
 		{'audio'}, {'audio', 'file'}:
452 461
 			emit_signal("event_start", "audio", event)
453
-			if event['audio'] == 'play':
462
+			if event['audio'] == 'play' and 'file' in event.keys() and not event['file'].empty():
454 463
 				$FX/AudioStreamPlayer.stream = load(event['file'])
455 464
 				$FX/AudioStreamPlayer.play()
456
-			# Todo: audio stop
465
+			else:
466
+				$FX/AudioStreamPlayer.stop()
467
+			go_to_next_event()
468
+		{'background-music'}, {'background-music', 'file'}:
469
+			emit_signal("event_start", "background-music", event)
470
+			if event['background-music'] == 'play' and 'file' in event.keys() and not event['file'].empty():
471
+				var stream: AudioStream = load(event['file'])
472
+				$FX/BackgroundMusic.crossfade_to(stream)
473
+			else:
474
+				$FX/BackgroundMusic.fade_out()
457 475
 			go_to_next_event()
458 476
 		{'endbranch', ..}:
459 477
 			emit_signal("event_start", "endbranch", event)
@@ -500,9 +518,12 @@ func event_handler(event: Dictionary):
500 518
 			else:
501 519
 				# condition met, entering branch
502 520
 				go_to_next_event()
503
-		{'set_value', 'definition'}:
521
+		{'set_value', 'definition', ..}:
504 522
 			emit_signal("event_start", "set_value", event)
505
-			DialogicSingleton.set_variable_from_id(event['definition'], event['set_value'])
523
+			var operation = '='
524
+			if 'operation' in event and not event['operation'].empty():
525
+				operation = event["operation"]
526
+			DialogicSingleton.set_variable_from_id(event['definition'], event['set_value'], operation)
506 527
 			go_to_next_event()
507 528
 		_:
508 529
 			visible = false
@@ -650,6 +671,7 @@ func deferred_resize(current_size, result):
650 671
 	if current_size != $TextBubble.rect_size:
651 672
 		resize_main()
652 673
 
674
+
653 675
 func load_theme(filename):
654 676
 	var theme = DialogicResources.get_theme_config(filename)
655 677
 
@@ -659,11 +681,11 @@ func load_theme(filename):
659 681
 	# Text
660 682
 	var theme_font = load(theme.get_value('text', 'font', 'res://addons/dialogic/Fonts/DefaultFont.tres'))
661 683
 	$TextBubble/RichTextLabel.set('custom_fonts/normal_font', theme_font)
662
-	$TextBubble/NameLabel.set('custom_fonts/normal_font', theme_font)
684
+	$TextBubble/NameLabel.set('custom_fonts/font', theme_font)
663 685
 
664 686
 	var text_color = Color(theme.get_value('text', 'color', '#ffffffff'))
665 687
 	$TextBubble/RichTextLabel.set('custom_colors/default_color', text_color)
666
-	$TextBubble/NameLabel.set('custom_colors/default_color', text_color)
688
+	$TextBubble/NameLabel.set('custom_colors/font_color', text_color)
667 689
 
668 690
 	$TextBubble/RichTextLabel.set('custom_colors/font_color_shadow', Color('#00ffffff'))
669 691
 	$TextBubble/NameLabel.set('custom_colors/font_color_shadow', Color('#00ffffff'))
@@ -671,13 +693,11 @@ func load_theme(filename):
671 693
 	if theme.get_value('text', 'shadow', false):
672 694
 		var text_shadow_color = Color(theme.get_value('text', 'shadow_color', '#9e000000'))
673 695
 		$TextBubble/RichTextLabel.set('custom_colors/font_color_shadow', text_shadow_color)
674
-		$TextBubble/NameLabel.set('custom_colors/font_color_shadow', text_shadow_color)
675 696
 
676 697
 	var shadow_offset = theme.get_value('text', 'shadow_offset', Vector2(2,2))
677 698
 	$TextBubble/RichTextLabel.set('custom_constants/shadow_offset_x', shadow_offset.x)
678
-	$TextBubble/NameLabel.set('custom_constants/shadow_offset_x', shadow_offset.x)
679 699
 	$TextBubble/RichTextLabel.set('custom_constants/shadow_offset_y', shadow_offset.y)
680
-	$TextBubble/NameLabel.set('custom_constants/shadow_offset_y', shadow_offset.y)
700
+	
681 701
 
682 702
 	# Text speed
683 703
 	text_speed = theme.get_value('text','speed', 2) * 0.01
@@ -705,7 +725,19 @@ func load_theme(filename):
705 725
 	$DefinitionInfo/VBoxContainer/Title.set('custom_fonts/normal_font', definitions_font)
706 726
 	$DefinitionInfo/VBoxContainer/Content.set('custom_fonts/normal_font', definitions_font)
707 727
 	$DefinitionInfo/VBoxContainer/Extra.set('custom_fonts/normal_font', definitions_font)
708
-
728
+	
729
+	# Character Name
730
+	$TextBubble/NameLabel/ColorRect.visible = theme.get_value('name', 'background_visible', false)
731
+	$TextBubble/NameLabel/ColorRect.color = Color(theme.get_value('name', 'background', '#282828'))
732
+	$TextBubble/NameLabel/TextureRect.visible = theme.get_value('name', 'image_visible', false)
733
+	$TextBubble/NameLabel/TextureRect.texture = load(theme.get_value('name','image', "res://addons/dialogic/Images/background/background-2.png"))
734
+	var name_shadow_offset = theme.get_value('name', 'shadow_offset', Vector2(2,2))
735
+	if theme.get_value('name', 'shadow_visible', false):
736
+		$TextBubble/NameLabel.set('custom_colors/font_color_shadow', Color(theme.get_value('name', 'shadow', '#9e000000')))
737
+		$TextBubble/NameLabel.set('custom_constants/shadow_offset_x', name_shadow_offset.x)
738
+		$TextBubble/NameLabel.set('custom_constants/shadow_offset_y', name_shadow_offset.y)
739
+	$TextBubble/NameLabel.rect_position.y = theme.get_value('name', 'bottom_gap', 48) * -1
740
+	
709 741
 	return theme
710 742
 
711 743
 

+ 27
- 2
addons/dialogic/Other/DialogicSingleton.gd View File

@@ -50,10 +50,35 @@ func set_variable(name: String, value) -> void:
50 50
 			d['value'] = str(value)
51 51
 
52 52
 
53
-func set_variable_from_id(id: String, value) -> void:
53
+func set_variable_from_id(id: String, value: String, operation: String) -> void:
54
+	var target_def: Dictionary;
54 55
 	for d in current_definitions['variables']:
55 56
 		if d['id'] == id:
56
-			d['value'] = str(value)
57
+			target_def = d;
58
+	if target_def != null:
59
+		var converted_set_value = value
60
+		var converted_target_value = target_def['value']
61
+		var is_number = converted_set_value.is_valid_float() and converted_target_value.is_valid_float()
62
+		if is_number:
63
+			converted_set_value = float(value)
64
+			converted_target_value = float(target_def['value'])
65
+		var result = target_def['value']
66
+		# Do nothing for -, * and / operations on string
67
+		match operation:
68
+			'=':
69
+				result = converted_set_value
70
+			'+':
71
+				result = converted_target_value + converted_set_value
72
+			'-':
73
+				if is_number:
74
+					result = converted_target_value - converted_set_value
75
+			'*':
76
+				if is_number:
77
+					result = converted_target_value * converted_set_value
78
+			'/':
79
+				if is_number:
80
+					result = converted_target_value / converted_set_value
81
+		target_def['value'] = str(result)
57 82
 
58 83
 
59 84
 func get_glossary(name: String) -> Dictionary:

+ 6
- 0
dialogic/themes/theme-1616657646.cfg View File

@@ -10,3 +10,9 @@ color="#ffd11515"
10 10
 [settings]
11 11
 
12 12
 name="theme_questions"
13
+
14
+[name]
15
+
16
+auto_color=true
17
+image_visible=true
18
+shadow_visible=true

+ 9
- 0
dialogic/themes/theme-1616657657.cfg View File

@@ -15,3 +15,12 @@ size=Vector2( 910, 167 )
15 15
 [text]
16 16
 
17 17
 margin=Vector2( 20, 10 )
18
+alignment="Left"
19
+
20
+[definitions]
21
+
22
+color="#ffffffff"
23
+
24
+[name]
25
+
26
+image_visible=true

+ 6
- 0
project.godot View File

@@ -14,6 +14,11 @@ _global_script_classes=[ {
14 14
 "language": "GDScript",
15 15
 "path": "res://addons/dialogic/Other/DialogicClass.gd"
16 16
 }, {
17
+"base": "Control",
18
+"class": "DialogicBackgroundMusic",
19
+"language": "GDScript",
20
+"path": "res://addons/dialogic/Nodes/BackgroundMusic.gd"
21
+}, {
17 22
 "base": "Node",
18 23
 "class": "DialogicDefinitionsUtil",
19 24
 "language": "GDScript",
@@ -31,6 +36,7 @@ _global_script_classes=[ {
31 36
 } ]
32 37
 _global_script_class_icons={
33 38
 "Dialogic": "",
39
+"DialogicBackgroundMusic": "",
34 40
 "DialogicDefinitionsUtil": "",
35 41
 "DialogicResources": "",
36 42
 "DialogicUtil": ""

Loading…
Cancel
Save