update dialogic

This commit is contained in:
Arnaud Vergnet 2021-03-27 10:53:28 +01:00
parent 7187b24a92
commit 356064758a
39 changed files with 1239 additions and 314 deletions

View file

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

View file

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

17
UI.tscn Normal file
View file

@ -0,0 +1,17 @@
[gd_scene format=2]
[node name="UI" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
text = "UI"
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=12 format=2]
[ext_resource path="res://addons/dialogic/Images/next-indicator.png" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Images/background/background-2.png" type="Texture" id=2]
@ -6,9 +6,11 @@
[ext_resource path="res://addons/dialogic/Fonts/GlossaryFont.tres" type="DynamicFont" id=4]
[ext_resource path="res://addons/dialogic/Nodes/glossary_info.gd" type="Script" id=5]
[ext_resource path="res://addons/dialogic/Nodes/dialog_node.gd" type="Script" id=6]
[ext_resource path="res://addons/dialogic/Nodes/BackgroundMusic.tscn" type="PackedScene" id=7]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 1, 1, 1, 0 )
expand_margin_left = 10.0
[sub_resource type="Animation" id=2]
loop = true
@ -26,6 +28,12 @@ tracks/0/keys = {
}
[sub_resource type="StyleBoxFlat" id=3]
content_margin_left = 10.0
content_margin_right = 10.0
bg_color = Color( 1, 1, 1, 0 )
expand_margin_left = 10.0
[sub_resource type="StyleBoxFlat" id=4]
bg_color = Color( 0.196078, 0.196078, 0.196078, 0 )
[node name="DialogNode" type="Control"]
@ -65,20 +73,19 @@ margin_top = -207.0
margin_right = 455.0
margin_bottom = -40.0
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="TextBubble"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
color = Color( 0, 0, 0, 0.639216 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="TextBubble"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 2 )
@ -98,8 +105,8 @@ margin_bottom = -10.0
rect_clip_content = false
custom_styles/normal = SubResource( 1 )
custom_fonts/normal_font = ExtResource( 3 )
custom_colors/default_color = Color( 0.756863, 0.172549, 0.172549, 1 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 0.619608 )
custom_colors/default_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_shadow = Color( 1, 1, 1, 0 )
custom_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
bbcode_enabled = true
@ -133,22 +140,43 @@ __meta__ = {
autoplay = "IDLE"
anims/IDLE = SubResource( 2 )
[node name="NameLabel" type="RichTextLabel" parent="TextBubble"]
margin_left = 2.0
margin_top = -37.0
margin_right = 369.0
rect_clip_content = false
custom_styles/normal = SubResource( 1 )
custom_fonts/normal_font = ExtResource( 3 )
custom_colors/default_color = Color( 0.756863, 0.172549, 0.172549, 1 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 0.619608 )
[node name="NameLabel" type="Label" parent="TextBubble"]
margin_top = -40.0
margin_right = 58.0
size_flags_vertical = 1
custom_styles/normal = SubResource( 3 )
custom_fonts/font = ExtResource( 3 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
custom_colors/font_color_shadow = Color( 1, 1, 1, 0 )
custom_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
custom_constants/shadow_as_outline = 10
bbcode_enabled = true
bbcode_text = "Name Here"
text = "Name Here"
scroll_active = false
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="TextBubble/NameLabel"]
show_behind_parent = true
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 15
size_flags_vertical = 15
color = Color( 0, 0, 0, 0.721569 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="TextBubble/NameLabel"]
visible = false
show_behind_parent = true
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource( 2 )
expand = true
stretch_mode = 1
__meta__ = {
"_edit_use_anchors_": false
}
@ -213,13 +241,15 @@ __meta__ = {
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="FX"]
[node name="BackgroundMusic" parent="FX" instance=ExtResource( 7 )]
[node name="DefinitionInfo" type="PanelContainer" parent="."]
visible = false
margin_right = 208.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 3 )
custom_styles/panel = SubResource( 4 )
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true,

View file

@ -12,6 +12,9 @@ onready var empty_editor = get_node('../Empty')
onready var tree = self
var timeline_icon = load("res://addons/dialogic/Images/timeline.svg")
var character_icon = load("res://addons/dialogic/Images/character.svg")
var theme_icon = load("res://addons/dialogic/Images/Resources/theme.svg")
var definition_icon = load("res://addons/dialogic/Images/Resources/definition.svg")
var glossary_icon = load("res://addons/dialogic/Images/Resources/glossary.svg")
var timelines_tree
var characters_tree
var definitions_tree
@ -115,7 +118,7 @@ func build_themes(selected_item: String=''):
func _add_theme(theme_item, select = false):
var item = tree.create_item(themes_tree)
item.set_icon(0, get_icon("StyleBoxTexture", "EditorIcons"))
item.set_icon(0, theme_icon)
item.set_text(0, theme_item['name'])
theme_item['editor'] = 'Theme'
item.set_metadata(0, theme_item)
@ -156,9 +159,9 @@ func build_definitions(selected_item: String=''):
func _add_definition(definition, select = false):
var item = tree.create_item(definitions_tree)
item.set_text(0, definition['name'])
item.set_icon(0, get_icon("Variant", "EditorIcons"))
item.set_icon(0, definition_icon)
if definition['type'] == 1:
item.set_icon(0, get_icon("ScriptCreateDialog", "EditorIcons"))
item.set_icon(0, glossary_icon)
definition['editor'] = 'Definition'
item.set_metadata(0, definition)

View file

@ -1,5 +1,5 @@
tool
extends Control
extends HBoxContainer
var editor_reference
var editorPopup
@ -9,11 +9,14 @@ var stop_icon = load("res://addons/dialogic/Images/stop.svg")
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'audio': 'play',
'audio': 'stop',
'file': ''
}
func _ready():
load_audio('')
func _on_ButtonAudio_pressed():
editor_reference.godot_dialog("*.wav, *.ogg, *.mp3")
editor_reference.godot_dialog_connect(self, "_on_file_selected")
@ -23,15 +26,23 @@ func _on_file_selected(path, target):
target.load_audio(path)
func load_audio(path):
func load_audio(path: String):
if not path.empty():
$PanelContainer/VBoxContainer/Header/Name.text = path
$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = false
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
event_data['file'] = path
event_data['audio'] = 'play'
else:
$PanelContainer/VBoxContainer/Header/Name.text = 'No sound (will stop previous audio event)'
$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = true
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = true
event_data['file'] = ''
event_data['audio'] = 'stop'
func load_data(data):
event_data = data
if data['file'] != '':
load_audio(data['file'])
@ -46,3 +57,7 @@ func _on_ButtonPreviewPlay_pressed():
func _on_AudioPreview_finished():
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = play_icon
func _on_ButtonClear_pressed():
load_audio('')

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/AudioBlock.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=2]
@ -6,6 +6,7 @@
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/dialogic/Images/play.svg" type="Texture" id=5]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=7]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 16.0
@ -83,9 +84,16 @@ margin_right = 115.0
margin_bottom = 28.0
text = "..."
[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
[node name="ButtonClear" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 119.0
margin_right = 153.0
margin_right = 147.0
margin_bottom = 28.0
disabled = true
icon = ExtResource( 7 )
[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 151.0
margin_right = 185.0
margin_bottom = 28.0
disabled = true
icon = ExtResource( 5 )
@ -100,7 +108,7 @@ custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
text = " ..."
[node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
margin_left = 157.0
margin_left = 189.0
margin_right = 1735.0
margin_bottom = 28.0
@ -114,5 +122,6 @@ items = [ "Move Up", null, 0, false, false, 0, 0, null, "", false, "Move Down",
[node name="DragController" parent="." instance=ExtResource( 6 )]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonAudio" to="." method="_on_ButtonAudio_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonClear" to="." method="_on_ButtonClear_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonPreviewPlay" to="." method="_on_ButtonPreviewPlay_pressed"]
[connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

View file

@ -0,0 +1,63 @@
tool
extends HBoxContainer
var editor_reference
var editorPopup
var play_icon = load("res://addons/dialogic/Images/play.svg")
var stop_icon = load("res://addons/dialogic/Images/stop.svg")
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'background-music': 'stop',
'file': ''
}
func _ready():
load_audio('')
func _on_ButtonAudio_pressed():
editor_reference.godot_dialog("*.wav, *.ogg, *.mp3")
editor_reference.godot_dialog_connect(self, "_on_file_selected")
func _on_file_selected(path, target):
target.load_audio(path)
func load_audio(path: String):
if not path.empty():
$PanelContainer/VBoxContainer/Header/Name.text = path
$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = false
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
event_data['file'] = path
event_data['background-music'] = 'play'
else:
$PanelContainer/VBoxContainer/Header/Name.text = 'No music (will stop with fade out)'
$PanelContainer/VBoxContainer/Header/ButtonClear.disabled = true
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = true
event_data['file'] = ''
event_data['background-music'] = 'stop'
func load_data(data):
event_data = data
load_audio(data['file'])
func _on_ButtonPreviewPlay_pressed():
if $PanelContainer/AudioPreview.is_playing():
$PanelContainer/AudioPreview.stop()
else:
$PanelContainer/AudioPreview.stream = load(event_data['file'])
$PanelContainer/AudioPreview.play()
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = stop_icon
func _on_AudioPreview_finished():
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.icon = play_icon
func _on_ButtonClear_pressed():
load_audio('')

View file

@ -0,0 +1,128 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/BackgroundMusic.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Images/audio-event.svg" type="Texture" id=3]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/dialogic/Images/play.svg" type="Texture" id=5]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=7]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 16.0
content_margin_right = 6.0
content_margin_top = 6.0
content_margin_bottom = 6.0
bg_color = Color( 0.298039, 0.172549, 0.14902, 0.447059 )
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color( 0.12549, 0.12549, 0.12549, 1 )
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
[node name="BackgroundMusic" type="HBoxContainer"]
margin_right = 1798.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_left = 6.0
margin_top = 6.0
margin_right = 1792.0
margin_bottom = 36.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1798.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
custom_styles/panel = SubResource( 1 )
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 1792.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 1776.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 3 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 150.0
margin_bottom = 21.0
text = " Background Music"
[node name="Name" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 154.0
margin_top = 7.0
margin_right = 188.0
margin_bottom = 21.0
text = "None"
[node name="ButtonAudio" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 192.0
margin_right = 216.0
margin_bottom = 28.0
text = "..."
[node name="ButtonClear" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 220.0
margin_right = 248.0
margin_bottom = 28.0
disabled = true
icon = ExtResource( 7 )
[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 252.0
margin_right = 286.0
margin_bottom = 28.0
disabled = true
icon = ExtResource( 5 )
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
visible = false
margin_left = 103.0
margin_top = 8.0
margin_right = 131.0
margin_bottom = 22.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
text = " ..."
[node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
margin_left = 290.0
margin_right = 1735.0
margin_bottom = 28.0
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 1739.0
margin_right = 1776.0
margin_bottom = 28.0
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 ]
[node name="AudioPreview" type="AudioStreamPlayer" parent="PanelContainer"]
[node name="DragController" parent="." instance=ExtResource( 6 )]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonAudio" to="." method="_on_ButtonAudio_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonClear" to="." method="_on_ButtonClear_pressed"]
[connection signal="pressed" from="PanelContainer/VBoxContainer/Header/ButtonPreviewPlay" to="." method="_on_ButtonPreviewPlay_pressed"]
[connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

View file

@ -0,0 +1,54 @@
tool
extends MenuButton
var options = [
{
"text": "[ To be ]",
"operation": "="
},
{
"text": "[ add ]",
"operation": "+"
},
{
"text": "[ remove ]",
"operation": "-"
},
{
"text": "[ multiply by ]",
"operation": "*"
},
{
"text": "[ divide by ]",
"operation": "/"
},
]
func _ready():
get_popup().connect("index_pressed", self, '_on_entry_selected')
get_popup().clear()
connect("about_to_show", self, "_on_MenuButton_about_to_show")
func _on_MenuButton_about_to_show():
get_popup().clear()
var index = 0
for o in options:
get_popup().add_item(o['text'])
get_popup().set_item_metadata(index, o)
index += 1
func _on_entry_selected(index):
var _text = get_popup().get_item_text(index)
var metadata = get_popup().get_item_metadata(index)
text = _text
func load_condition(condition):
if condition != '':
for o in options:
if (o['operation'] == condition):
text = o['text']
else:
text = options[0]['text']

View file

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

View file

@ -12,14 +12,17 @@ func _ready():
func _on_OptionSelected(index):
var timeline_editor = current_piece.editor_reference.get_node('MainPanel/TimelineEditor')
if index == 0:
# Moving this up
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'up')
timeline_editor.move_block(current_piece, 'up')
elif index == 1:
# Moving piece down
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'down')
timeline_editor.move_block(current_piece, 'down')
elif index == 3:
# Removing a piece
if timeline_editor.selected_item == current_piece:
timeline_editor.selected_item = null
# TODO: Add a warning here if the event has changes
current_piece.queue_free()
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').indent_events()
timeline_editor.indent_events()

View file

@ -7,27 +7,38 @@ var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'definition': '',
'operation': '=',
'set_value': '',
'definition': ''
}
onready var nodes = {
'definition_picker': $PanelContainer/VBoxContainer/Header/DefinitionPicker,
'operation_picker': $PanelContainer/VBoxContainer/Header/OperationPicker,
}
func _ready():
nodes['definition_picker'].get_popup().connect("index_pressed", self, '_on_definition_entry_selected')
nodes['operation_picker'].get_popup().connect("index_pressed", self, '_on_operation_entry_selected')
func _on_definition_entry_selected(index):
var metadata = nodes['definition_picker'].get_popup().get_item_metadata(index)
event_data['definition'] = metadata['id']
func _on_operation_entry_selected(index):
var metadata = nodes['operation_picker'].get_popup().get_item_metadata(index)
event_data['operation'] = metadata['operation']
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/LineEdit.text = event_data['set_value']
nodes['definition_picker'].load_definition(data['definition'])
var operation = ''
if 'operation' in data:
operation = data['operation']
nodes['operation_picker'].load_condition(operation)
func _on_LineEdit_text_changed(new_text):

View file

@ -1,11 +1,12 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=10 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/SetValue.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Images/Events/set-value.svg" type="Texture" id=2]
[ext_resource path="res://addons/dialogic/Images/Resources/definition.svg" type="Texture" id=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/Spacer.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DefinitionPicker.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/OperationPicker.tscn" type="PackedScene" id=7]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 16.0
@ -86,16 +87,12 @@ margin_left = 137.0
margin_right = 280.0
margin_bottom = 28.0
[node name="Title2" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 284.0
margin_top = 7.0
margin_right = 333.0
margin_bottom = 21.0
text = "to be "
[node name="OperationPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
margin_right = 347.0
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 337.0
margin_right = 385.0
margin_left = 351.0
margin_right = 399.0
margin_bottom = 28.0
custom_styles/read_only = SubResource( 2 )
custom_styles/focus = SubResource( 2 )
@ -112,14 +109,14 @@ caret_blink = true
caret_blink_speed = 0.5
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 389.0
margin_left = 403.0
margin_top = 7.0
margin_right = 389.0
margin_right = 403.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 3 )]
margin_left = 393.0
margin_left = 407.0
margin_right = 941.0
margin_bottom = 28.0
@ -130,4 +127,5 @@ margin_bottom = 28.0
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 ]
[node name="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="text_changed" from="PanelContainer/VBoxContainer/Header/LineEdit" to="." method="_on_LineEdit_text_changed"]

View file

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

View file

@ -0,0 +1,35 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/SectionTitle.gd" type="Script" id=1]
[node name="PanelContainer" type="Panel"]
margin_right = 138.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="HBoxContainer"]
margin_top = 8.0
margin_right = 138.0
margin_bottom = 22.0
size_flags_horizontal = 3
text = "PanelContainer"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CheckBox" type="CheckBox" parent="HBoxContainer"]
visible = false
margin_left = 114.0
margin_right = 138.0
margin_bottom = 30.0

View file

@ -51,6 +51,18 @@ onready var n = {
# Text preview
'preview_panel': $VBoxContainer/Panel,
'text_preview': $VBoxContainer/HBoxContainer3/TextEdit,
# Character Names
'name_auto_color': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/CheckBox,
'name_background_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/CheckBox,
'name_background': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/ColorPickerButton,
'name_image': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/BackgroundTextureButton,
'name_image_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/CheckBox,
'name_shadow': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/ColorPickerButtonShadow,
'name_shadow_visible': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/CheckBoxShadow,
'name_shadow_offset_x': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetX,
'name_shadow_offset_y': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetY,
'name_bottom_gap': $VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5/BottomGap,
}
func _ready():
@ -113,9 +125,29 @@ func load_theme(filename):
'Right':
n['alignment'].select(2)
# Name
n['name_auto_color'].pressed = theme.get_value('name', 'auto_color', true)
n['name_background_visible'].pressed = theme.get_value('name', 'background_visible', false)
n['name_background'].color = Color(theme.get_value('name', 'background', "#ff000000"))
n['name_image_visible'].pressed = theme.get_value('name', 'image_visible', false)
n['name_image'].text = DialogicResources.get_filename_from_path(theme.get_value('name', 'image', 'res://addons/dialogic/Images/background/background-2.png'))
n['name_shadow'].color = Color(theme.get_value('name', 'shadow', "#9e000000"))
n['name_shadow_visible'].pressed = theme.get_value('name', 'shadow_visible', true)
n['name_shadow_offset_x'].value = theme.get_value('name', 'shadow_offset', Vector2(2,2)).x
n['name_shadow_offset_y'].value = theme.get_value('name', 'shadow_offset', Vector2(2,2)).y
n['name_bottom_gap'].value = theme.get_value('name', 'bottom_gap', 48)
# Preview text
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]')
# Updating the preview
_on_PreviewButton_pressed()
func new_theme():
var theme_file = 'theme-' + str(OS.get_unix_time()) + '.cfg'
@ -172,21 +204,36 @@ func _on_PreviewButton_pressed():
preview_dialog.preview = true
preview_dialog.get_node('DefinitionInfo').in_theme_editor = true
preview_dialog.get_node('TextBubble/NextIndicator/AnimationPlayer').play('IDLE')
# Random character preview if there are any
var characters = DialogicUtil.get_character_list()
var character_file = ''
if characters.size():
characters.shuffle()
character_file = characters[0]['file']
# Creating the one event timeline for the dialog
preview_dialog.dialog_script['events'] = [{
"character":"",
"portrait":"",
"character": character_file,
"portrait":'',
"text": preview_dialog.parse_definitions(n['text_preview'].text)
}]
# Settings
preview_dialog.parse_characters(preview_dialog.dialog_script)
preview_dialog.settings = DialogicResources.get_settings_config()
# Alignment
n['preview_panel'].add_child(preview_dialog)
# Not sure why but I need to reload the theme again for it to work properly
preview_dialog.load_dialog()
preview_dialog.current_theme = preview_dialog.load_theme(current_theme)
# maintaining the preview panel big enough for the dialog box
# When not performing this step, the dialog name doesn't update the color for some reason
# I should probably refactor the preview dialog to stop making everything manually.
if n['name_auto_color'].pressed:
if characters.size():
preview_dialog.get_node('TextBubble/NameLabel').set('custom_colors/font_color', characters[0]['color'])
# maintaining the preview panel big enough for the dialog box
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)
n['preview_panel'].rect_size.y = 0
@ -324,3 +371,46 @@ func _on_Alignment_item_selected(index):
func _on_Preview_text_changed():
DialogicResources.set_theme_value(current_theme, 'text', 'preview', n['text_preview'].text)
func _on_name_auto_color_toggled(button_pressed):
DialogicResources.set_theme_value(current_theme, 'name', 'auto_color', button_pressed)
func _on_name_background_visible_toggled(button_pressed):
DialogicResources.set_theme_value(current_theme, 'name', 'background_visible', button_pressed)
func _on_name_background_color_changed(color):
DialogicResources.set_theme_value(current_theme, 'name', 'background', '#' + color.to_html())
func _on_name_image_visible_toggled(button_pressed):
DialogicResources.set_theme_value(current_theme, 'name', 'image_visible', button_pressed)
func _on_name_image_pressed():
editor_reference.godot_dialog("*.png")
editor_reference.godot_dialog_connect(self, "_on_name_texture_selected")
func _on_name_texture_selected(path, target):
DialogicResources.set_theme_value(current_theme, 'name', 'image', path)
n['name_image'].text = DialogicResources.get_filename_from_path(path)
func _on_shadow_visible_toggled(button_pressed):
DialogicResources.set_theme_value(current_theme, 'name', 'shadow_visible', button_pressed)
func _on_name_shadow_color_changed(color):
DialogicResources.set_theme_value(current_theme, 'name', 'shadow', '#' + color.to_html())
func _on_name_ShadowOffset_value_changed(_value):
DialogicResources.set_theme_value(current_theme, 'name','shadow_offset',
Vector2(n['name_shadow_offset_x'].value,n['name_shadow_offset_y'].value))
func _on_name_BottomGap_value_changed(value):
DialogicResources.set_theme_value(current_theme, 'name', 'bottom_gap', value)

View file

@ -1,30 +1,32 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/dialogic/Images/plugin-editor-icon.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd" type="Script" id=2]
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/SectionTitle.tscn" type="PackedScene" id=3]
[node name="ThemeEditor" type="ScrollContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 261.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 1048.0
margin_bottom = 623.0
margin_right = 1273.0
margin_bottom = 701.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 15
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
margin_right = 1048.0
margin_bottom = 218.0
margin_right = 1273.0
margin_bottom = 296.0
[node name="Text" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_right = 316.0
margin_bottom = 218.0
margin_bottom = 296.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
@ -169,10 +171,257 @@ text = "Left"
items = [ "Left", null, false, 0, null, "Center", null, false, 1, null, "Right", null, false, 2, null ]
selected = 0
[node name="DialogBox" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
[node name="Glossary" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_left = 320.0
margin_right = 614.0
margin_bottom = 218.0
margin_right = 635.0
margin_bottom = 296.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Character Name" parent="VBoxContainer/HBoxContainer2/Glossary" instance=ExtResource( 3 )]
margin_right = 315.0
[node name="GridContainer2" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
margin_top = 34.0
margin_right = 315.0
margin_bottom = 204.0
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 5.0
margin_right = 126.0
margin_bottom = 19.0
text = "Background Color"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_right = 288.0
margin_bottom = 24.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 24.0
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2"]
margin_left = 28.0
margin_right = 158.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 33.0
margin_right = 126.0
margin_bottom = 47.0
text = "Background Texture"
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_top = 28.0
margin_right = 288.0
margin_bottom = 52.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3"]
margin_right = 24.0
margin_bottom = 24.0
pressed = true
[node name="BackgroundTextureButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3"]
margin_left = 28.0
margin_right = 158.0
margin_bottom = 24.0
size_flags_horizontal = 3
text = "background-2"
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 64.0
margin_right = 126.0
margin_bottom = 78.0
text = "Shadow"
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_top = 56.0
margin_right = 288.0
margin_bottom = 86.0
[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4"]
margin_right = 24.0
margin_bottom = 30.0
[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4"]
margin_left = 28.0
margin_right = 158.0
margin_bottom = 30.0
rect_min_size = Vector2( 50, 30 )
size_flags_horizontal = 3
color = Color( 0, 0, 0, 0.619608 )
[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 95.0
margin_right = 126.0
margin_bottom = 109.0
text = "Shadow Offset"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_top = 90.0
margin_right = 288.0
margin_bottom = 114.0
custom_constants/separation = 10
[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer"]
margin_right = 74.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "X"
[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer"]
margin_left = 84.0
margin_right = 158.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "Y"
[node name="Label8" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 123.0
margin_right = 126.0
margin_bottom = 137.0
text = "Bottom gap"
[node name="HBoxContainer5" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_top = 118.0
margin_right = 288.0
margin_bottom = 142.0
[node name="BottomGap" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5"]
margin_right = 74.0
margin_bottom = 24.0
max_value = 999.0
value = 48.0
allow_greater = true
allow_lesser = true
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_top = 151.0
margin_right = 126.0
margin_bottom = 165.0
text = "Auto color"
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer2"]
margin_left = 130.0
margin_top = 146.0
margin_right = 288.0
margin_bottom = 170.0
[node name="Glossary Panel" parent="VBoxContainer/HBoxContainer2/Glossary" instance=ExtResource( 3 )]
margin_top = 208.0
margin_right = 315.0
margin_bottom = 238.0
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
margin_top = 242.0
margin_right = 315.0
margin_bottom = 296.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_top = 3.0
margin_right = 210.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Font"
[node name="FontButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_left = 220.0
margin_right = 315.0
margin_bottom = 20.0
size_flags_vertical = 4
text = "GlossaryFont"
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_top = 32.0
margin_right = 210.0
margin_bottom = 46.0
text = "Color"
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_left = 220.0
margin_top = 24.0
margin_right = 315.0
margin_bottom = 54.0
rect_min_size = Vector2( 50, 30 )
color = Color( 0.215686, 0.654902, 0.67451, 1 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 66.0
margin_right = 141.0
margin_bottom = 80.0
text = "Shadow"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 58.0
margin_right = 213.0
margin_bottom = 88.0
[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 30.0
[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
margin_left = 28.0
margin_right = 213.0
margin_bottom = 30.0
rect_min_size = Vector2( 50, 30 )
size_flags_horizontal = 3
color = Color( 0, 0, 0, 0.619608 )
[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 63.0
margin_right = 141.0
margin_bottom = 77.0
text = "S, Offset"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 58.0
margin_right = 213.0
margin_bottom = 82.0
custom_constants/separation = 10
[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
margin_right = 74.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "X"
[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
margin_left = 84.0
margin_right = 158.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "Y"
[node name="DialogBox" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_left = 639.0
margin_right = 954.0
margin_bottom = 296.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
@ -180,7 +429,7 @@ __meta__ = {
}
[node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/DialogBox"]
margin_right = 294.0
margin_right = 315.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
@ -194,7 +443,7 @@ __meta__ = {
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/DialogBox"]
margin_top = 34.0
margin_right = 294.0
margin_right = 315.0
margin_bottom = 218.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
@ -359,9 +608,9 @@ items = [ "[Select Action]", null, false, 0, null, "ui_accept", null, false, 1,
selected = 0
[node name="ButtonStyle" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_left = 618.0
margin_right = 906.0
margin_bottom = 218.0
margin_left = 958.0
margin_right = 1273.0
margin_bottom = 296.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
@ -369,7 +618,7 @@ __meta__ = {
}
[node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/ButtonStyle"]
margin_right = 288.0
margin_right = 315.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
@ -383,7 +632,7 @@ __meta__ = {
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle"]
margin_top = 34.0
margin_right = 288.0
margin_right = 315.0
margin_bottom = 170.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
@ -505,125 +754,10 @@ value = 5.0
rounded = true
allow_lesser = true
[node name="Glossary" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_left = 910.0
margin_right = 1048.0
margin_bottom = 218.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PanelContainer" type="Panel" parent="VBoxContainer/HBoxContainer2/Glossary"]
margin_right = 138.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/PanelContainer"]
margin_right = 40.0
margin_bottom = 14.0
text = "Glossary Panel"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Glossary"]
margin_top = 34.0
margin_right = 138.0
margin_bottom = 88.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_top = 3.0
margin_right = 33.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Font"
[node name="FontButton" type="Button" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_left = 43.0
margin_right = 138.0
margin_bottom = 20.0
size_flags_vertical = 4
text = "GlossaryFont"
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_top = 32.0
margin_right = 33.0
margin_bottom = 46.0
text = "Color"
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
margin_left = 43.0
margin_top = 24.0
margin_right = 138.0
margin_bottom = 54.0
rect_min_size = Vector2( 50, 30 )
color = Color( 0.215686, 0.654902, 0.67451, 1 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 66.0
margin_right = 141.0
margin_bottom = 80.0
text = "Shadow"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 58.0
margin_right = 213.0
margin_bottom = 88.0
[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 30.0
[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2"]
margin_left = 28.0
margin_right = 213.0
margin_bottom = 30.0
rect_min_size = Vector2( 50, 30 )
size_flags_horizontal = 3
color = Color( 0, 0, 0, 0.619608 )
[node name="Label4" type="Label" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 63.0
margin_right = 141.0
margin_bottom = 77.0
text = "S, Offset"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer"]
visible = false
margin_top = 58.0
margin_right = 213.0
margin_bottom = 82.0
custom_constants/separation = 10
[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
margin_right = 74.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "X"
[node name="ShadowOffsetY" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer"]
margin_left = 84.0
margin_right = 158.0
margin_bottom = 24.0
value = 2.0
rounded = true
allow_lesser = true
prefix = "Y"
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 233.0
margin_right = 1048.0
margin_bottom = 293.0
margin_top = 311.0
margin_right = 1273.0
margin_bottom = 371.0
custom_constants/separation = 10
[node name="PreviewButton" type="Button" parent="VBoxContainer/HBoxContainer3"]
@ -634,7 +768,7 @@ icon = ExtResource( 1 )
[node name="TextEdit" type="TextEdit" parent="VBoxContainer/HBoxContainer3"]
margin_left = 162.0
margin_right = 1048.0
margin_right = 1273.0
margin_bottom = 60.0
rect_min_size = Vector2( 400, 60 )
size_flags_horizontal = 3
@ -643,18 +777,18 @@ text = "This is preview text. You can use [color=#A5EFAC]BBCode[/color] to styl
wrap_enabled = true
[node name="Panel" type="Panel" parent="VBoxContainer"]
margin_top = 308.0
margin_right = 1048.0
margin_bottom = 608.0
margin_top = 386.0
margin_right = 1273.0
margin_bottom = 686.0
rect_min_size = Vector2( 0, 300 )
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 623.0
margin_right = 1048.0
margin_bottom = 623.0
margin_top = 701.0
margin_right = 1273.0
margin_bottom = 701.0
[node name="Control" type="Control" parent="VBoxContainer/HBoxContainer"]
margin_right = 1048.0
margin_right = 1273.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -666,6 +800,22 @@ size_flags_vertical = 3
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/TextSpeed" to="." method="_on_textSpeed_value_changed"]
[connection signal="item_selected" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer3/Alignment" to="." method="_on_Alignment_item_selected"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/CheckBox" to="." method="_on_name_background_visible_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer2/ColorPickerButton" to="." method="_on_name_background_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/CheckBox" to="." method="_on_name_image_visible_toggled"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer3/BackgroundTextureButton" to="." method="_on_name_image_pressed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/CheckBoxShadow" to="." method="_on_shadow_visible_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer4/ColorPickerButtonShadow" to="." method="_on_name_shadow_color_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetX" to="." method="_on_name_ShadowOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer/ShadowOffsetY" to="." method="_on_name_ShadowOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/HBoxContainer5/BottomGap" to="." method="_on_name_BottomGap_value_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer2/CheckBox" to="." method="_on_name_auto_color_toggled"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/FontButton" to="." method="_on_GlossaryFontButton_pressed"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/ColorPickerButton" to="." method="_on_GlossaryColorPicker_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/CheckBoxShadow" to="." method="_on_CheckBoxShadow_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/ColorPickerButtonShadow" to="." method="_on_ColorPickerButtonShadow_color_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetX" to="." method="_on_ShadowOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/CheckBox" to="." method="_on_BackgroundColor_CheckBox_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/ColorPickerButton" to="." method="_on_BackgroundColor_ColorPickerButton_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3/CheckBox" to="." method="_on_BackgroundTexture_CheckBox_toggled"]
@ -687,11 +837,5 @@ size_flags_vertical = 3
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetV" to="." method="_on_ButtonOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetH" to="." method="_on_ButtonOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/VerticalSeparation" to="." method="_on_VerticalSeparation_value_changed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/FontButton" to="." method="_on_GlossaryFontButton_pressed"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/ColorPickerButton" to="." method="_on_GlossaryColorPicker_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/CheckBoxShadow" to="." method="_on_CheckBoxShadow_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer2/ColorPickerButtonShadow" to="." method="_on_ColorPickerButtonShadow_color_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetX" to="." method="_on_ShadowOffset_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Glossary/GridContainer/HBoxContainer/ShadowOffsetY" to="." method="_on_ShadowOffset_value_changed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer3/PreviewButton" to="." method="_on_PreviewButton_pressed"]
[connection signal="text_changed" from="VBoxContainer/HBoxContainer3/TextEdit" to="." method="_on_Preview_text_changed"]

View file

@ -172,6 +172,8 @@ func load_timeline(filename: String):
create_event("CharacterJoinBlock", i)
{'audio', 'file'}:
create_event("AudioBlock", i)
{'background-music', 'file'}:
create_event("BackgroundMusic", i)
{'question', 'options'}:
create_event("Question", i)
{'choice'}:
@ -192,7 +194,7 @@ func load_timeline(filename: String):
create_event("WaitSeconds", i)
{'condition', 'definition', 'value'}:
create_event("IfCondition", i)
{'set_value', 'definition'}:
{'set_value', 'definition', ..}:
create_event("SetValue", i)
{'set_theme'}:
create_event("SetTheme", i)

View file

@ -10,7 +10,7 @@
[ext_resource path="res://addons/dialogic/Images/question.svg" type="Texture" id=8]
[ext_resource path="res://addons/dialogic/Images/end-choice.svg" type="Texture" id=9]
[ext_resource path="res://addons/dialogic/Images/change-timeline.svg" type="Texture" id=10]
[ext_resource path="res://addons/dialogic/Images/ListSelect.svg" type="Texture" id=11]
[ext_resource path="res://addons/dialogic/Images/Resources/definition.svg" type="Texture" id=11]
[ext_resource path="res://addons/dialogic/Images/choice.svg" type="Texture" id=12]
[ext_resource path="res://addons/dialogic/Images/tutorials/arrow-down.svg" type="Texture" id=13]
[ext_resource path="res://addons/dialogic/Images/Wait.svg" type="Texture" id=14]
@ -54,7 +54,7 @@ __meta__ = {
}
[node name="TimelineArea" type="ScrollContainer" parent="."]
margin_right = 826.0
margin_right = 816.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -66,7 +66,7 @@ __meta__ = {
[node name="TimeLine" type="VBoxContainer" parent="TimelineArea"]
margin_left = 5.0
margin_top = 5.0
margin_right = 821.0
margin_right = 811.0
margin_bottom = 595.0
grow_horizontal = 2
grow_vertical = 2
@ -74,14 +74,14 @@ size_flags_horizontal = 3
size_flags_vertical = 3
[node name="ScrollContainer" type="ScrollContainer" parent="."]
margin_left = 834.0
margin_left = 824.0
margin_right = 1024.0
margin_bottom = 600.0
rect_min_size = Vector2( 190, 0 )
rect_min_size = Vector2( 200, 0 )
[node name="EventContainer" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 178.0
margin_bottom = 664.0
margin_right = 188.0
margin_bottom = 702.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
@ -89,13 +89,13 @@ __meta__ = {
}
[node name="EventsWarning" type="PanelContainer" parent="ScrollContainer/EventContainer"]
margin_right = 178.0
margin_right = 188.0
margin_bottom = 68.0
custom_styles/panel = SubResource( 2 )
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/EventContainer/EventsWarning"]
margin_top = 10.0
margin_right = 172.0
margin_right = 182.0
margin_bottom = 58.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -112,7 +112,7 @@ stretch_mode = 4
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/EventsWarning/HBoxContainer"]
margin_left = 44.0
margin_right = 172.0
margin_right = 182.0
margin_bottom = 48.0
rect_min_size = Vector2( 100, 0 )
size_flags_horizontal = 3
@ -123,7 +123,7 @@ autowrap = true
[node name="HBoxContainer6" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 72.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 86.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer6"]
@ -133,13 +133,13 @@ text = "Main Events"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer6"]
margin_left = 81.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="TextBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 90.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 118.0
text = " Text Event"
icon = ExtResource( 2 )
@ -147,7 +147,7 @@ align = 0
[node name="CharacterJoinBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 122.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 150.0
text = " Character Join"
icon = ExtResource( 1 )
@ -155,7 +155,7 @@ align = 0
[node name="CharacterLeaveBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 154.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 182.0
text = " Character Leave"
icon = ExtResource( 7 )
@ -163,7 +163,7 @@ align = 0
[node name="HBoxContainer5" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 186.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 200.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer5"]
@ -173,13 +173,13 @@ text = "Logic"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer5"]
margin_left = 37.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="ButtonQuestion" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 204.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 232.0
text = " Question"
icon = ExtResource( 8 )
@ -187,7 +187,7 @@ align = 0
[node name="Choice" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 236.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 264.0
text = " Choice"
icon = ExtResource( 12 )
@ -195,7 +195,7 @@ align = 0
[node name="IfCondition" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 268.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 296.0
text = " Condition"
icon = ExtResource( 5 )
@ -203,7 +203,7 @@ align = 0
[node name="EndBranch" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 300.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 328.0
text = " End Branch"
icon = ExtResource( 9 )
@ -211,16 +211,16 @@ align = 0
[node name="SetValue" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 332.0
margin_right = 178.0
margin_bottom = 354.0
margin_right = 188.0
margin_bottom = 360.0
text = " Set Value"
icon = ExtResource( 11 )
align = 0
[node name="HBoxContainer3" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 358.0
margin_right = 178.0
margin_bottom = 372.0
margin_top = 364.0
margin_right = 188.0
margin_bottom = 378.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer3"]
margin_right = 56.0
@ -229,55 +229,55 @@ text = "Timeline"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer3"]
margin_left = 60.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="ChangeTimeline" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 376.0
margin_right = 178.0
margin_bottom = 404.0
margin_top = 382.0
margin_right = 188.0
margin_bottom = 410.0
hint_tooltip = "This will instantly teleport you to the start of the desired timeline."
text = " Change Timeline"
icon = ExtResource( 10 )
align = 0
[node name="SceneEvent" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 408.0
margin_right = 178.0
margin_bottom = 436.0
margin_top = 414.0
margin_right = 188.0
margin_bottom = 442.0
text = " Scene Event"
icon = ExtResource( 4 )
align = 0
[node name="CloseDialog" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 440.0
margin_right = 178.0
margin_bottom = 468.0
margin_top = 446.0
margin_right = 188.0
margin_bottom = 474.0
text = " Close Dialog"
icon = ExtResource( 6 )
align = 0
[node name="WaitSeconds" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 472.0
margin_right = 178.0
margin_bottom = 500.0
margin_top = 478.0
margin_right = 188.0
margin_bottom = 506.0
text = " Wait Seconds"
icon = ExtResource( 14 )
align = 0
[node name="SetTheme" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 504.0
margin_right = 178.0
margin_bottom = 532.0
margin_top = 510.0
margin_right = 188.0
margin_bottom = 538.0
text = " Set Theme"
icon = ExtResource( 18 )
align = 0
[node name="HBoxContainer4" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 536.0
margin_right = 178.0
margin_bottom = 550.0
margin_top = 542.0
margin_right = 188.0
margin_bottom = 556.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer4"]
margin_right = 37.0
@ -286,22 +286,30 @@ text = "Audio"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer4"]
margin_left = 41.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="AudioBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 554.0
margin_right = 178.0
margin_bottom = 582.0
margin_top = 560.0
margin_right = 188.0
margin_bottom = 588.0
text = " Audio Event"
icon = ExtResource( 3 )
align = 0
[node name="BackgroundMusic" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 592.0
margin_right = 188.0
margin_bottom = 620.0
text = " Background Music"
icon = ExtResource( 3 )
align = 0
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 586.0
margin_right = 178.0
margin_bottom = 600.0
margin_top = 624.0
margin_right = 188.0
margin_bottom = 638.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer"]
margin_right = 39.0
@ -310,22 +318,22 @@ text = "Godot"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer"]
margin_left = 43.0
margin_right = 178.0
margin_right = 188.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="EmitSignal" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 604.0
margin_right = 178.0
margin_bottom = 632.0
margin_top = 642.0
margin_right = 188.0
margin_bottom = 670.0
text = " Emit Signal"
icon = ExtResource( 16 )
align = 0
[node name="ChangeScene" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 636.0
margin_right = 178.0
margin_bottom = 664.0
margin_top = 674.0
margin_right = 188.0
margin_bottom = 702.0
hint_tooltip = "This will instantly change
the current scene."
text = " Change Scene"

View file

@ -1 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 437 B

View file

@ -0,0 +1,3 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/definition.svg-336e1b41e3ab4ef43367e0f0bbc50c2c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Resources/definition.svg"
dest_files=[ "res://.import/definition.svg-336e1b41e3ab4ef43367e0f0bbc50c2c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -0,0 +1,3 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
</svg>

After

Width:  |  Height:  |  Size: 331 B

View file

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/glossary.svg-469b641a988c9791f270a494be069208.stex"
path="res://.import/glossary.svg-6fbd6bb0ce43791e7b31d146806b81c8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/glossary.svg"
dest_files=[ "res://.import/glossary.svg-469b641a988c9791f270a494be069208.stex" ]
source_file="res://addons/dialogic/Images/Resources/glossary.svg"
dest_files=[ "res://.import/glossary.svg-6fbd6bb0ce43791e7b31d146806b81c8.stex" ]
[params]

View file

@ -0,0 +1,4 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
<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"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.stex"
path="res://.import/theme.svg-d2e167fcbacd86111397e731ff3f28eb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/ListSelect.svg"
dest_files=[ "res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.stex" ]
source_file="res://addons/dialogic/Images/Resources/theme.svg"
dest_files=[ "res://.import/theme.svg-d2e167fcbacd86111397e731ff3f28eb.stex" ]
[params]

View file

@ -1,5 +1,4 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
<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"/>
<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"/>
<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"/>
</svg>

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 585 B

View file

@ -1,4 +1,4 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 4H5V18H14V16H7V14H11V12H7V10H14V9H17V4ZM15 6H7V8H15V6Z" fill="white"/>
<path d="M17 13H20V15H17V18H15V15H12V13H15V10H17V13Z" fill="#A5EFAC"/>
<path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
<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"/>
</svg>

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -1,5 +1,5 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
<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"/>
<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"/>
<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"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -1,11 +1,7 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<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"/>
<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"/>
<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"/>
<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"/>
<path d="M18 13H21V15H18V18H16V15H13V13H16V10H18V13Z" fill="#A5EFAC"/>
<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"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="22" height="22" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 766 B

View file

@ -1,4 +0,0 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8" stroke="white" stroke-width="2"/>
<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"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,24 @@
extends Control
class_name DialogicBackgroundMusic
onready var _anim_player := $AnimationPlayer
onready var _track1 := $Track1
onready var _track2 := $Track2
func crossfade_to(audio_stream: AudioStream) -> void:
if _track1.playing and _track2.playing:
return
if _track2.playing:
_track1.stream = audio_stream
_track1.play()
_anim_player.play("FadeToTrack1")
else:
_track2.stream = audio_stream
_track2.play()
_anim_player.play("FadeToTrack2")
func fade_out() -> void:
_anim_player.play("FadeOut")

View file

@ -0,0 +1,152 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/dialogic/Nodes/BackgroundMusic.gd" type="Script" id=1]
[sub_resource type="Animation" id=3]
resource_name = "FadeOut"
tracks/0/type = "value"
tracks/0/path = NodePath("Track1:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Track2:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Track2:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("Track1:playing")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=1]
resource_name = "FadeToTrack1"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Track1:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ -80.0, 0.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Track2:volume_db")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Track2:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[sub_resource type="Animation" id=2]
resource_name = "FadeToTrack2"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Track1:volume_db")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ 0.0, -80.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Track1:playing")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Track2:volume_db")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 5.66, 1 ),
"update": 0,
"values": [ -80.0, 0.0 ]
}
[node name="BackgroundMusic" type="Control"]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Track1" type="AudioStreamPlayer" parent="."]
[node name="Track2" type="AudioStreamPlayer" parent="."]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/FadeOut = SubResource( 3 )
anims/FadeToTrack1 = SubResource( 1 )
anims/FadeToTrack2 = SubResource( 2 )

View file

@ -239,6 +239,7 @@ func parse_definitions(text: String):
final_text = _insert_glossary_definitions(final_text)
return final_text
func _insert_variable_definitions(text: String):
var final_text := text;
for d in definitions['variables']:
@ -299,23 +300,29 @@ func start_text_tween():
$TextBubble/Tween.start()
func update_name(character, color='#FFFFFF'):
func update_name(character, color: Color = Color.white) -> void:
if character.has('name'):
var parsed_name = character['name']
if character.has('display_name'):
if character['display_name'] != '':
parsed_name = character['display_name']
if character.has('color'):
color = '#' + character['color'].to_html()
$TextBubble/NameLabel.bbcode_text = '[color=' + color + ']' + parsed_name + '[/color]'
color = character['color']
parsed_name = parse_definitions(parsed_name)
$TextBubble/NameLabel.visible = true
# Hack to reset the size
$TextBubble/NameLabel.rect_min_size = Vector2(0, 0)
$TextBubble/NameLabel.rect_size = Vector2(-1, 40)
# Setting the color and text
$TextBubble/NameLabel.text = parsed_name
$TextBubble/NameLabel.set('custom_colors/font_color', color)
else:
$TextBubble/NameLabel.bbcode_text = ''
return true
$TextBubble/NameLabel.visible = false
func update_text(text):
# Updating the text and starting the animation from 0
$TextBubble/RichTextLabel.bbcode_text = self.parse_definitions(text)
$TextBubble/RichTextLabel.bbcode_text = parse_definitions(text)
$TextBubble/RichTextLabel.percent_visible = 0
# The call to this function needs to be deferred.
@ -337,6 +344,7 @@ func on_timeline_end():
DialogicSingleton.set_current_timeline('')
emit_signal("event_end", "timeline")
func load_dialog(skip_add = false):
# Emitting signals
if dialog_script.has('events'):
@ -361,7 +369,8 @@ func load_dialog(skip_add = false):
func reset_dialog_extras():
$TextBubble/NameLabel.bbcode_text = ''
$TextBubble/NameLabel.text = ''
$TextBubble/NameLabel.visible = false
func get_character(character_id):
@ -450,10 +459,19 @@ func event_handler(event: Dictionary):
go_to_next_event()
{'audio'}, {'audio', 'file'}:
emit_signal("event_start", "audio", event)
if event['audio'] == 'play':
if event['audio'] == 'play' and 'file' in event.keys() and not event['file'].empty():
$FX/AudioStreamPlayer.stream = load(event['file'])
$FX/AudioStreamPlayer.play()
# Todo: audio stop
else:
$FX/AudioStreamPlayer.stop()
go_to_next_event()
{'background-music'}, {'background-music', 'file'}:
emit_signal("event_start", "background-music", event)
if event['background-music'] == 'play' and 'file' in event.keys() and not event['file'].empty():
var stream: AudioStream = load(event['file'])
$FX/BackgroundMusic.crossfade_to(stream)
else:
$FX/BackgroundMusic.fade_out()
go_to_next_event()
{'endbranch', ..}:
emit_signal("event_start", "endbranch", event)
@ -500,9 +518,12 @@ func event_handler(event: Dictionary):
else:
# condition met, entering branch
go_to_next_event()
{'set_value', 'definition'}:
{'set_value', 'definition', ..}:
emit_signal("event_start", "set_value", event)
DialogicSingleton.set_variable_from_id(event['definition'], event['set_value'])
var operation = '='
if 'operation' in event and not event['operation'].empty():
operation = event["operation"]
DialogicSingleton.set_variable_from_id(event['definition'], event['set_value'], operation)
go_to_next_event()
_:
visible = false
@ -650,6 +671,7 @@ func deferred_resize(current_size, result):
if current_size != $TextBubble.rect_size:
resize_main()
func load_theme(filename):
var theme = DialogicResources.get_theme_config(filename)
@ -659,11 +681,11 @@ func load_theme(filename):
# Text
var theme_font = load(theme.get_value('text', 'font', 'res://addons/dialogic/Fonts/DefaultFont.tres'))
$TextBubble/RichTextLabel.set('custom_fonts/normal_font', theme_font)
$TextBubble/NameLabel.set('custom_fonts/normal_font', theme_font)
$TextBubble/NameLabel.set('custom_fonts/font', theme_font)
var text_color = Color(theme.get_value('text', 'color', '#ffffffff'))
$TextBubble/RichTextLabel.set('custom_colors/default_color', text_color)
$TextBubble/NameLabel.set('custom_colors/default_color', text_color)
$TextBubble/NameLabel.set('custom_colors/font_color', text_color)
$TextBubble/RichTextLabel.set('custom_colors/font_color_shadow', Color('#00ffffff'))
$TextBubble/NameLabel.set('custom_colors/font_color_shadow', Color('#00ffffff'))
@ -671,13 +693,11 @@ func load_theme(filename):
if theme.get_value('text', 'shadow', false):
var text_shadow_color = Color(theme.get_value('text', 'shadow_color', '#9e000000'))
$TextBubble/RichTextLabel.set('custom_colors/font_color_shadow', text_shadow_color)
$TextBubble/NameLabel.set('custom_colors/font_color_shadow', text_shadow_color)
var shadow_offset = theme.get_value('text', 'shadow_offset', Vector2(2,2))
$TextBubble/RichTextLabel.set('custom_constants/shadow_offset_x', shadow_offset.x)
$TextBubble/NameLabel.set('custom_constants/shadow_offset_x', shadow_offset.x)
$TextBubble/RichTextLabel.set('custom_constants/shadow_offset_y', shadow_offset.y)
$TextBubble/NameLabel.set('custom_constants/shadow_offset_y', shadow_offset.y)
# Text speed
text_speed = theme.get_value('text','speed', 2) * 0.01
@ -706,6 +726,18 @@ func load_theme(filename):
$DefinitionInfo/VBoxContainer/Content.set('custom_fonts/normal_font', definitions_font)
$DefinitionInfo/VBoxContainer/Extra.set('custom_fonts/normal_font', definitions_font)
# Character Name
$TextBubble/NameLabel/ColorRect.visible = theme.get_value('name', 'background_visible', false)
$TextBubble/NameLabel/ColorRect.color = Color(theme.get_value('name', 'background', '#282828'))
$TextBubble/NameLabel/TextureRect.visible = theme.get_value('name', 'image_visible', false)
$TextBubble/NameLabel/TextureRect.texture = load(theme.get_value('name','image', "res://addons/dialogic/Images/background/background-2.png"))
var name_shadow_offset = theme.get_value('name', 'shadow_offset', Vector2(2,2))
if theme.get_value('name', 'shadow_visible', false):
$TextBubble/NameLabel.set('custom_colors/font_color_shadow', Color(theme.get_value('name', 'shadow', '#9e000000')))
$TextBubble/NameLabel.set('custom_constants/shadow_offset_x', name_shadow_offset.x)
$TextBubble/NameLabel.set('custom_constants/shadow_offset_y', name_shadow_offset.y)
$TextBubble/NameLabel.rect_position.y = theme.get_value('name', 'bottom_gap', 48) * -1
return theme

View file

@ -50,10 +50,35 @@ func set_variable(name: String, value) -> void:
d['value'] = str(value)
func set_variable_from_id(id: String, value) -> void:
func set_variable_from_id(id: String, value: String, operation: String) -> void:
var target_def: Dictionary;
for d in current_definitions['variables']:
if d['id'] == id:
d['value'] = str(value)
target_def = d;
if target_def != null:
var converted_set_value = value
var converted_target_value = target_def['value']
var is_number = converted_set_value.is_valid_float() and converted_target_value.is_valid_float()
if is_number:
converted_set_value = float(value)
converted_target_value = float(target_def['value'])
var result = target_def['value']
# Do nothing for -, * and / operations on string
match operation:
'=':
result = converted_set_value
'+':
result = converted_target_value + converted_set_value
'-':
if is_number:
result = converted_target_value - converted_set_value
'*':
if is_number:
result = converted_target_value * converted_set_value
'/':
if is_number:
result = converted_target_value / converted_set_value
target_def['value'] = str(result)
func get_glossary(name: String) -> Dictionary:

View file

@ -10,3 +10,9 @@ color="#ffd11515"
[settings]
name="theme_questions"
[name]
auto_color=true
image_visible=true
shadow_visible=true

View file

@ -15,3 +15,12 @@ size=Vector2( 910, 167 )
[text]
margin=Vector2( 20, 10 )
alignment="Left"
[definitions]
color="#ffffffff"
[name]
image_visible=true

View file

@ -14,6 +14,11 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://addons/dialogic/Other/DialogicClass.gd"
}, {
"base": "Control",
"class": "DialogicBackgroundMusic",
"language": "GDScript",
"path": "res://addons/dialogic/Nodes/BackgroundMusic.gd"
}, {
"base": "Node",
"class": "DialogicDefinitionsUtil",
"language": "GDScript",
@ -31,6 +36,7 @@ _global_script_classes=[ {
} ]
_global_script_class_icons={
"Dialogic": "",
"DialogicBackgroundMusic": "",
"DialogicDefinitionsUtil": "",
"DialogicResources": "",
"DialogicUtil": ""