Add dialogic plugin

https://github.com/coppolaemilio/dialogic
This commit is contained in:
Arnaud Vergnet 2021-03-15 16:22:11 +01:00
parent 3b54fe4e06
commit 1cf5125f7d
200 changed files with 10021 additions and 1 deletions

17
Main.gd Normal file
View file

@ -0,0 +1,17 @@
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
var new_dialog = Dialogic.start('timeline1')
add_child(new_dialog)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

6
Main.tscn Normal file
View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Main.gd" type="Script" id=1]
[node name="Main" type="Node"]
script = ExtResource( 1 )

296
addons/dialogic/Dialog.tscn Normal file
View file

@ -0,0 +1,296 @@
[gd_scene load_steps=10 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]
[ext_resource path="res://addons/dialogic/Fonts/DefaultFont.tres" type="DynamicFont" id=3]
[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]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 1, 1, 1, 0 )
[sub_resource type="Animation" id=2]
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:margin_bottom")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 12.0, 55.0 ]
}
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.196078, 0.196078, 0.196078, 0 )
[node name="DialogNode" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Background" type="TextureRect" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
expand = true
stretch_mode = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Portraits" type="Control" parent="."]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextBubble" type="Control" parent="."]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -455.0
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 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="TextBubble"]
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource( 2 )
expand = true
stretch_mode = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RichTextLabel" type="RichTextLabel" parent="TextBubble"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 20.0
margin_top = 10.0
margin_right = -20.0
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_constants/shadow_offset_x = 2
custom_constants/shadow_offset_y = 2
bbcode_enabled = true
bbcode_text = "Placeholder text for testing and formatting."
meta_underlined = false
text = "Placeholder text for testing and formatting."
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Tween" type="Tween" parent="TextBubble"]
[node name="NextIndicator" type="TextureRect" parent="TextBubble"]
visible = false
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -36.4279
margin_top = -35.9016
margin_right = 14.5721
margin_bottom = 12.0
rect_scale = Vector2( 0.4, 0.4 )
texture = ExtResource( 1 )
stretch_mode = 4
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="TextBubble/NextIndicator"]
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 )
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
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Options" type="VBoxContainer" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -20.0
margin_top = -19.9999
margin_right = 20.0
margin_bottom = 19.9999
grow_horizontal = 2
grow_vertical = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextInputDialog" type="AcceptDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -192.0
margin_top = -57.0
margin_right = 192.0
margin_bottom = 57.0
popup_exclusive = true
dialog_hide_on_ok = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LineEdit" type="LineEdit" parent="TextInputDialog"]
margin_left = 8.0
margin_top = 8.0
margin_right = 376.0
margin_bottom = 78.0
[node name="FX" type="Control" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
__meta__ = {
"_edit_group_": true,
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="FadeInNode" type="ColorRect" parent="FX"]
modulate = Color( 1, 1, 1, 0 )
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 0, 0, 0, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Tween" type="Tween" parent="FX/FadeInNode"]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="FX"]
[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 )
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="DefinitionInfo"]
mouse_filter = 1
size_flags_horizontal = 0
size_flags_vertical = 0
color = Color( 0.12549, 0.12549, 0.12549, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="DefinitionInfo"]
margin_right = 208.0
margin_bottom = 143.0
size_flags_horizontal = 3
size_flags_vertical = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Title" type="RichTextLabel" parent="DefinitionInfo/VBoxContainer"]
margin_right = 208.0
margin_bottom = 27.0
size_flags_horizontal = 3
size_flags_vertical = 4
custom_styles/normal = SubResource( 1 )
custom_fonts/normal_font = ExtResource( 4 )
bbcode_text = "This is the title"
text = "This is the title"
fit_content_height = true
scroll_active = false
[node name="Content" type="RichTextLabel" parent="DefinitionInfo/VBoxContainer"]
margin_top = 31.0
margin_right = 208.0
margin_bottom = 112.0
size_flags_horizontal = 3
custom_styles/normal = SubResource( 1 )
custom_fonts/normal_font = ExtResource( 4 )
text = "This is the main copy. Here you write the relevant"
fit_content_height = true
scroll_active = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Extra" type="RichTextLabel" parent="DefinitionInfo/VBoxContainer"]
self_modulate = Color( 1, 1, 1, 0.345098 )
margin_top = 116.0
margin_right = 208.0
margin_bottom = 143.0
size_flags_horizontal = 3
custom_styles/normal = SubResource( 1 )
custom_fonts/normal_font = ExtResource( 4 )
text = "Una linea extra"
fit_content_height = true
scroll_active = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Timer" type="Timer" parent="DefinitionInfo"]
[node name="WaitSeconds" type="Timer" parent="."]
[connection signal="meta_hover_ended" from="TextBubble/RichTextLabel" to="." method="_on_RichTextLabel_meta_hover_ended"]
[connection signal="meta_hover_started" from="TextBubble/RichTextLabel" to="." method="_on_RichTextLabel_meta_hover_started"]
[connection signal="tween_completed" from="TextBubble/Tween" to="." method="_on_Tween_tween_completed"]
[connection signal="timeout" from="DefinitionInfo/Timer" to="." method="_on_Definition_Timer_timeout"]
[connection signal="timeout" from="WaitSeconds" to="." method="_on_WaitSeconds_timeout"]

View file

@ -0,0 +1,189 @@
tool
extends ScrollContainer
var editor_reference
onready var master_tree = get_node('../MasterTree')
var opened_character_data
var portrait_entry = load("res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.tscn")
onready var nodes = {
'editor': $HBoxContainer/Container,
'name': $HBoxContainer/Container/Name/LineEdit,
'description': $HBoxContainer/Container/Description/TextEdit,
'file': $HBoxContainer/Container/FileName/LineEdit,
'color': $HBoxContainer/Container/Color/ColorPickerButton,
'default_speaker': $HBoxContainer/Container/Actions/DefaultSpeaker,
'display_name_checkbox': $HBoxContainer/Container/Name/CheckBox,
'display_name': $HBoxContainer/Container/DisplayName/LineEdit,
'new_portrait_button': $HBoxContainer/Container/ScrollContainer/VBoxContainer/HBoxContainer/Button,
'portrait_preview': $HBoxContainer/VBoxContainer/Control/TextureRect,
'scale': $HBoxContainer/VBoxContainer/HBoxContainer/Scale,
'offset_x': $HBoxContainer/VBoxContainer/HBoxContainer/OffsetX,
'offset_y': $HBoxContainer/VBoxContainer/HBoxContainer/OffsetY,
}
func _ready():
nodes['new_portrait_button'].connect('pressed', self, '_on_New_Portrait_Button_pressed')
nodes['display_name_checkbox'].connect('toggled', self, '_on_display_name_toggled')
nodes['name'].connect('text_changed', self, '_on_name_changed')
nodes['color'].connect('color_changed', self, '_on_color_changed')
func _on_display_name_toggled(button_pressed):
$HBoxContainer/Container/DisplayName.visible = button_pressed
func _on_name_changed(value):
var item = master_tree.get_selected()
item.set_text(0, value)
func _on_color_changed(color):
var item = master_tree.get_selected()
item.set_icon_modulate(0, color)
func clear_character_editor():
nodes['file'].text = ''
nodes['name'].text = ''
nodes['description'].text = ''
nodes['color'].color = Color('#ffffff')
nodes['default_speaker'].pressed = false
nodes['display_name_checkbox'].pressed = false
nodes['display_name'].text = ''
nodes['portraits'] = []
nodes['scale'].value = 100
nodes['offset_x'].value = 0
nodes['offset_y'].value = 0
# Clearing portraits
for p in $HBoxContainer/Container/ScrollContainer/VBoxContainer/PortraitList.get_children():
p.queue_free()
nodes['portrait_preview'].texture = null
# Character Creation
func create_character():
var character_file = 'character-' + str(OS.get_unix_time()) + '.json'
var character = {
'color': '#ffffff',
'id': character_file,
'default_speaker': false,
'portraits': []
}
var directory = Directory.new()
if not directory.dir_exists(DialogicUtil.get_path('WORKING_DIR')):
directory.make_dir(DialogicUtil.get_path('WORKING_DIR'))
if not directory.dir_exists(DialogicUtil.get_path('CHAR_DIR')):
directory.make_dir(DialogicUtil.get_path('CHAR_DIR'))
var file = File.new()
file.open(DialogicUtil.get_path('CHAR_DIR', character_file), File.WRITE)
file.store_line(to_json(character))
file.close()
character['metadata'] = {'file': character_file}
return character
func new_character():
# This event creates and selects the new timeline
master_tree.add_character(create_character()['metadata'], true)
# Saving and Loading
func generate_character_data_to_save():
var default_speaker: bool = nodes['default_speaker'].pressed
var portraits = []
for p in $HBoxContainer/Container/ScrollContainer/VBoxContainer/PortraitList.get_children():
var entry = {}
entry['name'] = p.get_node("NameEdit").text
entry['path'] = p.get_node("PathEdit").text
portraits.append(entry)
var info_to_save = {
'id': nodes['file'].text,
'description': nodes['description'].text,
'color': '#' + nodes['color'].color.to_html(),
'default_speaker': default_speaker,
'portraits': portraits,
'display_name_bool': nodes['display_name_checkbox'].pressed,
'display_name': nodes['display_name'].text,
'scale': nodes['scale'].value,
'offset_x': nodes['offset_x'].value,
'offset_y': nodes['offset_y'].value,
}
# Adding name later for cases when no name is provided
if nodes['name'].text != '':
info_to_save['name'] = nodes['name'].text
return info_to_save
func save_character():
var path = DialogicUtil.get_path('CHAR_DIR', nodes['file'].text)
var info_to_save = generate_character_data_to_save()
if info_to_save['id']:
var file = File.new()
file.open(path, File.WRITE)
file.store_line(to_json(info_to_save))
file.close()
opened_character_data = info_to_save
func load_character(path):
var data = DialogicUtil.load_json(path)
clear_character_editor()
opened_character_data = data
nodes['file'].text = data['id']
nodes['default_speaker'].pressed = false
if data.has('name'):
nodes['name'].text = data['name']
if data.has('description'):
nodes['description'].text = data['description']
if data.has('color'):
nodes['color'].color = Color(data['color'])
if data.has('default_speaker'):
if data['default_speaker']:
nodes['default_speaker'].pressed = true
if data.has('display_name_bool'):
nodes['display_name_checkbox'].pressed = data['display_name_bool']
if data.has('display_name'):
nodes['display_name'].text = data['display_name']
if data.has('scale'):
nodes['scale'].value = float(data['scale'])
if data.has('offset_x'):
nodes['offset_x'].value = data['offset_x']
nodes['offset_y'].value = data['offset_y']
# Portraits
var default_portrait = create_portrait_entry()
default_portrait.get_node('NameEdit').text = 'Default'
default_portrait.get_node('NameEdit').editable = false
if data.has('portraits'):
for p in data['portraits']:
if p['name'] == 'Default':
default_portrait.get_node('PathEdit').text = p['path']
default_portrait.update_preview(p['path'])
else:
create_portrait_entry(p['name'], p['path'])
# Portraits
func _on_New_Portrait_Button_pressed():
create_portrait_entry('', '', true)
func create_portrait_entry(p_name = '', path = '', grab_focus = false):
var p = portrait_entry.instance()
p.editor_reference = editor_reference
p.image_node = nodes['portrait_preview']
var p_list = $HBoxContainer/Container/ScrollContainer/VBoxContainer/PortraitList
p_list.add_child(p)
if p_name != '':
p.get_node("NameEdit").text = p_name
if path != '':
p.get_node("PathEdit").text = path
if grab_focus:
p.get_node("NameEdit").grab_focus()
p._on_ButtonSelect_pressed()
return p

View file

@ -0,0 +1,321 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/CharacterEditor.gd" type="Script" id=2]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 5.0
content_margin_bottom = 5.0
bg_color = Color( 0.2, 0.219608, 0.278431, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 0.0980392, 0.113725, 0.152941, 1 )
[node name="CharacterEditor" type="ScrollContainer"]
margin_left = 192.0
margin_right = 1253.0
margin_bottom = 661.0
custom_styles/bg = SubResource( 1 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="."]
margin_left = 5.0
margin_top = 5.0
margin_right = 1056.0
margin_bottom = 656.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Container" type="VBoxContainer" parent="HBoxContainer"]
margin_right = 523.0
margin_bottom = 651.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 9
[node name="Name" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_right = 523.0
margin_bottom = 24.0
[node name="Label" type="Label" parent="HBoxContainer/Container/Name"]
margin_top = 5.0
margin_right = 130.0
margin_bottom = 19.0
rect_min_size = Vector2( 130, 0 )
text = "Name: "
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/Container/Name"]
margin_left = 134.0
margin_right = 274.0
margin_bottom = 24.0
rect_min_size = Vector2( 140, 0 )
[node name="CheckBox" type="CheckBox" parent="HBoxContainer/Container/Name"]
margin_left = 278.0
margin_right = 451.0
margin_bottom = 24.0
text = "Different display name"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DisplayName" type="HBoxContainer" parent="HBoxContainer/Container"]
visible = false
margin_top = 28.0
margin_right = 491.0
margin_bottom = 52.0
__meta__ = {
"_editor_description_": "Display name is the name that will
show up on the dialogs in game."
}
[node name="Label" type="Label" parent="HBoxContainer/Container/DisplayName"]
margin_top = 5.0
margin_right = 130.0
margin_bottom = 19.0
rect_min_size = Vector2( 130, 0 )
text = "Display Name: "
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/Container/DisplayName"]
margin_left = 134.0
margin_right = 274.0
margin_bottom = 24.0
rect_min_size = Vector2( 140, 0 )
[node name="Color" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_top = 28.0
margin_right = 523.0
margin_bottom = 48.0
[node name="Label" type="Label" parent="HBoxContainer/Container/Color"]
margin_top = 3.0
margin_right = 130.0
margin_bottom = 17.0
rect_min_size = Vector2( 130, 0 )
text = "Color: "
[node name="ColorPickerButton" type="ColorPickerButton" parent="HBoxContainer/Container/Color"]
margin_left = 134.0
margin_right = 274.0
margin_bottom = 20.0
rect_min_size = Vector2( 140, 0 )
color = Color( 1, 1, 1, 1 )
edit_alpha = false
[node name="Description" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_top = 52.0
margin_right = 523.0
margin_bottom = 152.0
[node name="Label" type="Label" parent="HBoxContainer/Container/Description"]
margin_top = 43.0
margin_right = 130.0
margin_bottom = 57.0
rect_min_size = Vector2( 130, 0 )
text = "Description: "
[node name="TextEdit" type="TextEdit" parent="HBoxContainer/Container/Description"]
margin_left = 134.0
margin_right = 523.0
margin_bottom = 100.0
rect_min_size = Vector2( 100, 100 )
size_flags_horizontal = 3
[node name="Separator" type="Control" parent="HBoxContainer/Container"]
margin_top = 156.0
margin_right = 523.0
margin_bottom = 166.0
rect_min_size = Vector2( 0, 10 )
[node name="Portraits" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_top = 170.0
margin_right = 523.0
margin_bottom = 184.0
[node name="Label" type="Label" parent="HBoxContainer/Container/Portraits"]
margin_right = 143.0
margin_bottom = 14.0
text = "Portraits / Expressions"
[node name="Labels" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_top = 188.0
margin_right = 523.0
margin_bottom = 202.0
[node name="LineEdit" type="Label" parent="HBoxContainer/Container/Labels"]
margin_right = 100.0
margin_bottom = 14.0
rect_min_size = Vector2( 100, 0 )
text = "Name"
[node name="LineEdit2" type="Label" parent="HBoxContainer/Container/Labels"]
margin_left = 104.0
margin_right = 254.0
margin_bottom = 14.0
rect_min_size = Vector2( 150, 0 )
text = "Path"
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/Container"]
margin_top = 206.0
margin_right = 523.0
margin_bottom = 623.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/Container/ScrollContainer"]
margin_right = 523.0
margin_bottom = 417.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="PortraitList" type="VBoxContainer" parent="HBoxContainer/Container/ScrollContainer/VBoxContainer"]
margin_right = 523.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="PortraitEntry" parent="HBoxContainer/Container/ScrollContainer/VBoxContainer/PortraitList" instance=ExtResource( 1 )]
margin_right = 523.0
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Container/ScrollContainer/VBoxContainer"]
margin_top = 28.0
margin_right = 523.0
margin_bottom = 48.0
[node name="Button" type="Button" parent="HBoxContainer/Container/ScrollContainer/VBoxContainer/HBoxContainer"]
margin_right = 87.0
margin_bottom = 20.0
text = " Add new + "
[node name="FileName" type="HBoxContainer" parent="HBoxContainer/Container"]
visible = false
margin_top = 599.0
margin_right = 523.0
margin_bottom = 623.0
[node name="Label" type="Label" parent="HBoxContainer/Container/FileName"]
margin_top = 5.0
margin_right = 130.0
margin_bottom = 19.0
rect_min_size = Vector2( 130, 0 )
text = "File:"
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/Container/FileName"]
margin_left = 134.0
margin_right = 523.0
margin_bottom = 24.0
rect_min_size = Vector2( 140, 0 )
focus_mode = 0
size_flags_horizontal = 3
editable = false
[node name="Actions" type="HBoxContainer" parent="HBoxContainer/Container"]
margin_top = 627.0
margin_right = 523.0
margin_bottom = 651.0
[node name="DefaultSpeaker" type="CheckBox" parent="HBoxContainer/Container/Actions"]
margin_right = 128.0
margin_bottom = 24.0
hint_tooltip = "By selecting \"Default Speaker\" all the new
Text Events created will automatically
select this character by default.
You can only have 1 Default Speaker
per project."
text = "Default Speaker"
[node name="Control" type="Control" parent="HBoxContainer/Container/Actions"]
margin_left = 132.0
margin_right = 523.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
margin_left = 527.0
margin_right = 1051.0
margin_bottom = 651.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Control" type="Panel" parent="HBoxContainer/VBoxContainer"]
margin_right = 524.0
margin_bottom = 623.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/VBoxContainer/Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 30.0
margin_top = 30.0
margin_right = -30.0
margin_bottom = -30.0
rect_min_size = Vector2( 100, 100 )
size_flags_horizontal = 3
size_flags_vertical = 3
expand = true
stretch_mode = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer/Control"]
self_modulate = Color( 1, 1, 1, 0.396078 )
margin_right = 340.0
margin_bottom = 14.0
text = "Preview"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/VBoxContainer"]
margin_top = 627.0
margin_right = 524.0
margin_bottom = 651.0
[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 33.0
margin_bottom = 19.0
text = "Scale"
[node name="Scale" type="SpinBox" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 37.0
margin_right = 111.0
margin_bottom = 24.0
value = 100.0
allow_greater = true
align = 2
suffix = "%"
[node name="Label2" type="Label" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 115.0
margin_top = 5.0
margin_right = 186.0
margin_bottom = 19.0
text = " Offset"
[node name="OffsetX" type="SpinBox" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 190.0
margin_right = 290.0
margin_bottom = 24.0
rect_min_size = Vector2( 100, 0 )
allow_greater = true
allow_lesser = true
suffix = "X"
[node name="OffsetY" type="SpinBox" parent="HBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 294.0
margin_right = 394.0
margin_bottom = 24.0
rect_min_size = Vector2( 100, 0 )
allow_greater = true
allow_lesser = true
suffix = "Y"

View file

@ -0,0 +1,47 @@
tool
extends HBoxContainer
var editor_reference
var image_node
func _ready():
pass
func _process(_delta):
pass
func _on_ButtonDelete_pressed():
if $NameEdit.text == 'Default':
$PathEdit.text = ''
update_preview('')
else:
queue_free()
func _on_ButtonSelect_pressed():
editor_reference.godot_dialog("*.png, *.svg")
editor_reference.godot_dialog_connect(self, "_on_file_selected")
func _on_file_selected(path, target):
update_preview(path)
$PathEdit.text = path
if $NameEdit.text == '':
$NameEdit.text = DialogicUtil.get_filename_from_path(path)
func _on_focus_entered():
if $PathEdit.text != '':
update_preview($PathEdit.text)
func update_preview(path):
if path == '':
image_node.texture = null
else:
if '.png' in path or '.svg' in path:
image_node.texture = load(path)
return true
return false

View file

@ -0,0 +1,47 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/PortraitEntry.gd" type="Script" id=2]
[node name="PortraitEntry" type="HBoxContainer"]
margin_right = 451.0
margin_bottom = 24.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="NameEdit" type="LineEdit" parent="."]
margin_right = 160.0
margin_bottom = 24.0
rect_min_size = Vector2( 160, 0 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PathEdit" type="LineEdit" parent="."]
margin_left = 164.0
margin_right = 391.0
margin_bottom = 24.0
rect_min_size = Vector2( 150, 0 )
size_flags_horizontal = 3
editable = false
selecting_enabled = false
[node name="ButtonSelect" type="Button" parent="."]
margin_left = 395.0
margin_right = 419.0
margin_bottom = 24.0
text = "..."
[node name="ButtonDelete" type="Button" parent="."]
margin_left = 423.0
margin_right = 451.0
margin_bottom = 24.0
icon = ExtResource( 1 )
flat = true
[connection signal="focus_entered" from="NameEdit" to="." method="_on_focus_entered"]
[connection signal="focus_entered" from="PathEdit" to="." method="_on_focus_entered"]
[connection signal="pressed" from="ButtonSelect" to="." method="_on_ButtonSelect_pressed"]
[connection signal="pressed" from="ButtonDelete" to="." method="_on_ButtonDelete_pressed"]

View file

@ -0,0 +1,112 @@
tool
extends ScrollContainer
var editor_reference
onready var master_tree = get_node('../MasterTree')
var current_section = ''
onready var nodes = {
'name' : $VBoxContainer/HBoxContainer/VBoxContainer/Name,
'type': $VBoxContainer/HBoxContainer/VBoxContainer/TypeMenuButton,
'extra_editor': $VBoxContainer/HBoxContainer/ExtraInfo,
'value_editor': $VBoxContainer/HBoxContainer/Value,
'value': $VBoxContainer/HBoxContainer/Value/ValueInput,
'extra_title': $VBoxContainer/HBoxContainer/ExtraInfo/Title,
'extra_text': $VBoxContainer/HBoxContainer/ExtraInfo/Text,
'extra_extra': $VBoxContainer/HBoxContainer/ExtraInfo/Extra,
}
func _ready():
reset_editor()
nodes['name'].connect('text_changed', self, '_on_name_changed')
nodes['type'].connect('item_selected', self, '_on_type_selected')
func load_definition(section):
current_section = section
reset_editor()
nodes['name'].editable = true
nodes['name'].text = get_definition('name', 'Unnamed')
var type = get_definition('type', 0)
nodes['type'].select(type)
if type == 0:
nodes['value'].text = get_definition('value', '')
if type == 1:
nodes['extra_title'].text = get_definition('extra_title', '')
nodes['extra_text'].text = get_definition('extra_text', '')
nodes['extra_extra'].text = get_definition('extra_extra', '')
show_sub_editor(type)
func reset_editor():
nodes['name'].text = ''
nodes['value'].text = ''
nodes['extra_title'].text = ''
nodes['extra_text'].text = ''
nodes['extra_extra'].text = ''
nodes['type'].select(get_definition('type', 0))
func _on_name_changed(text):
var item = master_tree.get_selected()
item.set_text(0, text)
func _on_type_selected(index):
nodes['type'].select(index)
var item = master_tree.get_selected()
item.set_icon(0, get_icon("Variant", "EditorIcons"))
if index == 1:
item.set_icon(0, get_icon("ScriptCreateDialog", "EditorIcons"))
show_sub_editor(index)
func show_sub_editor(type):
nodes['extra_editor'].visible = false
nodes['value_editor'].visible = false
if type == 0:
nodes['value_editor'].visible = true
if type == 1:
nodes['extra_editor'].visible = true
func get_definition(key, default):
if current_section != '':
var config = ConfigFile.new()
config.load(DialogicUtil.get_path('DEFINITIONS_FILE'))
if config.has_section(current_section):
return config.get_value(current_section, key, default)
else:
return default
func new_definition():
var config = ConfigFile.new()
var section = DialogicUtil.generate_random_id()
var err = config.load(DialogicUtil.get_path('DEFINITIONS_FILE'))
if err == OK:
config.set_value(section, 'name', 'New definition')
config.set_value(section, 'type', 0)
config.set_value(section, 'value', '')
config.save(DialogicUtil.get_path('DEFINITIONS_FILE'))
master_tree.add_definition({'section': section,'name': 'New definition', 'type': 0}, true)
else:
print('Error loading definitions')
func save_definition():
if current_section != '':
var config = ConfigFile.new()
var err = config.load(DialogicUtil.get_path('DEFINITIONS_FILE'))
if err == OK:
config.set_value(current_section, 'name', nodes['name'].text)
var type = nodes['type'].selected
config.set_value(current_section, 'type', type)
if type == 0:
config.set_value(current_section, 'value', nodes['value'].text)
if type == 1:
config.set_value(current_section, 'extra_title', nodes['extra_title'].text)
config.set_value(current_section, 'extra_text', nodes['extra_text'].text)
config.set_value(current_section, 'extra_extra', nodes['extra_extra'].text)
config.save(DialogicUtil.get_path('DEFINITIONS_FILE'))

View file

@ -0,0 +1,108 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/DefinitionEditor/DefinitionEditor.gd" type="Script" id=1]
[node name="DefinitionEditor" type="ScrollContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_right = 1024.0
margin_bottom = 230.0
custom_constants/separation = 16
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
margin_right = 300.0
margin_bottom = 230.0
rect_min_size = Vector2( 300, 0 )
custom_constants/separation = 10
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
margin_right = 300.0
margin_bottom = 14.0
text = "Name"
[node name="Name" type="LineEdit" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
margin_top = 24.0
margin_right = 300.0
margin_bottom = 48.0
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
margin_top = 58.0
margin_right = 300.0
margin_bottom = 72.0
text = "Type:"
[node name="TypeMenuButton" type="OptionButton" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
margin_top = 82.0
margin_right = 300.0
margin_bottom = 102.0
text = "Variable"
expand_icon = true
items = [ "Variable", null, false, 0, null, "Extra Information", null, false, 1, null ]
selected = 0
[node name="ExtraInfo" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
margin_left = 316.0
margin_right = 616.0
margin_bottom = 230.0
rect_min_size = Vector2( 300, 0 )
[node name="RichTextLabel2" type="Label" parent="VBoxContainer/HBoxContainer/ExtraInfo"]
margin_right = 300.0
margin_bottom = 31.0
text = "A popup will display this information when a player hovers the word in a dialog. "
autowrap = true
[node name="Control" type="Control" parent="VBoxContainer/HBoxContainer/ExtraInfo"]
margin_top = 35.0
margin_right = 300.0
margin_bottom = 70.0
rect_min_size = Vector2( 0, 35 )
[node name="Title" type="LineEdit" parent="VBoxContainer/HBoxContainer/ExtraInfo"]
margin_top = 74.0
margin_right = 300.0
margin_bottom = 98.0
placeholder_text = "Title"
[node name="Text" type="TextEdit" parent="VBoxContainer/HBoxContainer/ExtraInfo"]
margin_top = 102.0
margin_right = 300.0
margin_bottom = 202.0
rect_min_size = Vector2( 0, 100 )
size_flags_vertical = 3
wrap_enabled = true
[node name="Extra" type="LineEdit" parent="VBoxContainer/HBoxContainer/ExtraInfo"]
margin_top = 206.0
margin_right = 300.0
margin_bottom = 230.0
placeholder_text = "Extra"
[node name="Value" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
margin_left = 632.0
margin_right = 932.0
margin_bottom = 230.0
rect_min_size = Vector2( 300, 0 )
custom_constants/separation = 10
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer/Value"]
margin_right = 300.0
margin_bottom = 14.0
text = "Value:"
[node name="ValueInput" type="LineEdit" parent="VBoxContainer/HBoxContainer/Value"]
margin_top = 24.0
margin_right = 300.0
margin_bottom = 48.0

View file

@ -0,0 +1,172 @@
tool
extends Control
var plugin_reference
var debug_mode: bool = true # For printing info
var editor_file_dialog # EditorFileDialog
var file_picker_data: Dictionary = {'method': '', 'node': self}
var current_editor_view: String = 'Master'
var version_string: String
onready var timeline_editor = $MainPanel/TimelineEditor
onready var character_editor = $MainPanel/CharacterEditor
onready var definition_editor = $MainPanel/DefinitionEditor
onready var theme_editor = $MainPanel/ThemeEditor
onready var settings_editor = $MainPanel/SettingsEditor
func _ready():
# Adding file dialog to get used by pieces
editor_file_dialog = EditorFileDialog.new()
add_child(editor_file_dialog)
# Setting references to this node
timeline_editor.editor_reference = self
character_editor.editor_reference = self
definition_editor.editor_reference = self
theme_editor.editor_reference = self
# Toolbar
$ToolBar/NewTimelineButton.connect('pressed', $MainPanel/TimelineEditor, 'new_timeline')
$ToolBar/NewCharactersButton.connect('pressed', $MainPanel/CharacterEditor, 'new_character')
$ToolBar/NewThemeButton.connect('pressed', $MainPanel/ThemeEditor, 'new_theme')
$ToolBar/NewDefinitionButton.connect('pressed', $MainPanel/DefinitionEditor, 'new_definition')
$ToolBar/Docs.icon = get_icon("Instance", "EditorIcons")
$ToolBar/Docs.connect('pressed', OS, "shell_open", ["https://dialogic.coppolaemilio.com"])
#$ToolBar/FoldTools/ButtonFold.connect('pressed', $EditorTimeline, 'fold_all_nodes')
#$ToolBar/FoldTools/ButtonUnfold.connect('pressed', $EditorTimeline, 'unfold_all_nodes')
# Connecting context menus
$TimelinePopupMenu.connect('id_pressed', self, '_on_TimelinePopupMenu_id_pressed')
$CharacterPopupMenu.connect('id_pressed', self, '_on_CharacterPopupMenu_id_pressed')
$ThemePopupMenu.connect('id_pressed', self, '_on_ThemePopupMenu_id_pressed')
$DefinitionPopupMenu.connect('id_pressed', self, '_on_DefinitionPopupMenu_id_pressed')
#Connecting confirmation menus
$RemoveTimelineConfirmation.connect('confirmed', self, '_on_RemoveTimelineConfirmation_confirmed')
$RemoveCharacterConfirmation.connect('confirmed', self, '_on_RemoveCharacterConfirmation_confirmed')
$RemoveThemeConfirmation.connect('confirmed', self, '_on_RemoveThemeConfirmation_confirmed')
$RemoveDefinitionConfirmation.connect('confirmed', self, '_on_RemoveDefinitionConfirmation_confirmed')
# Loading the version number
var config = ConfigFile.new()
var err = config.load("res://addons/dialogic/plugin.cfg")
if err == OK:
version_string = config.get_value("plugin", "version", "?")
$ToolBar/Version.text = 'v' + version_string
# Timeline context menu
func _on_TimelinePopupMenu_id_pressed(id):
if id == 0: # View files
OS.shell_open(ProjectSettings.globalize_path(DialogicUtil.get_path('TIMELINE_DIR')))
if id == 1: # Copy to clipboard
OS.set_clipboard($MainPanel/TimelineEditor.timeline_name)
if id == 2: # Remove
$RemoveTimelineConfirmation.popup_centered()
func _on_RemoveTimelineConfirmation_confirmed():
var dir = Directory.new()
var target = $MainPanel/TimelineEditor.working_timeline_file
print('target: ', target)
dir.remove(target)
$MainPanel/MasterTree.remove_selected()
$MainPanel/MasterTree.hide_all_editors(true)
# Character context menu
func _on_CharacterPopupMenu_id_pressed(id):
if id == 0:
OS.shell_open(ProjectSettings.globalize_path(DialogicUtil.get_path('CHAR_DIR')))
if id == 1:
$RemoveCharacterConfirmation.popup_centered()
# Theme context menu
func _on_ThemePopupMenu_id_pressed(id):
if id == 0:
OS.shell_open(ProjectSettings.globalize_path(DialogicUtil.get_path('THEME_DIR')))
if id == 1:
$RemoveThemeConfirmation.popup_centered()
# Definition context menu
func _on_DefinitionPopupMenu_id_pressed(id):
if id == 0:
OS.shell_open(ProjectSettings.globalize_path(DialogicUtil.get_path('DEFINITIONS_FILE')))
if id == 1:
$RemoveDefinitionConfirmation.popup_centered()
func _on_RemoveDefinitionConfirmation_confirmed():
var target = $MainPanel/DefinitionEditor.current_section
var config = ConfigFile.new()
var err = config.load(DialogicUtil.get_path('DEFINITIONS_FILE'))
if err == OK:
config.erase_section(target)
config.save(DialogicUtil.get_path('DEFINITIONS_FILE'))
$MainPanel/MasterTree.remove_selected()
$MainPanel/MasterTree.hide_all_editors(true)
else:
print('Error loading definitions')
func _on_RemoveCharacterConfirmation_confirmed():
var dir = Directory.new()
print($MainPanel/CharacterEditor.opened_character_data)
var target = DialogicUtil.get_path('CHAR_DIR', $MainPanel/CharacterEditor.opened_character_data['id'])
dir.remove(target)
$MainPanel/MasterTree.remove_selected()
$MainPanel/MasterTree.hide_all_editors(true)
func _on_RemoveThemeConfirmation_confirmed():
var dir = Directory.new()
var filepath = $MainPanel/MasterTree.get_selected().get_metadata(0)['file']
var target = DialogicUtil.get_path('THEME_DIR', filepath)
dir.remove(target)
$MainPanel/MasterTree.remove_selected()
$MainPanel/MasterTree.hide_all_editors(true)
# Godot dialog
func godot_dialog(filter):
editor_file_dialog.mode = EditorFileDialog.MODE_OPEN_FILE
editor_file_dialog.clear_filters()
editor_file_dialog.popup_centered_ratio(0.75)
editor_file_dialog.add_filter(filter)
return editor_file_dialog
func godot_dialog_connect(who, method_name):
var signal_name = "file_selected"
# Checking if previous connection exists, if it does, disconnect it.
if editor_file_dialog.is_connected(
signal_name,
file_picker_data['node'],
file_picker_data['method']):
editor_file_dialog.disconnect(
signal_name,
file_picker_data['node'],
file_picker_data['method']
)
# Connect new signal
editor_file_dialog.connect(signal_name, who, method_name, [who])
file_picker_data['method'] = method_name
file_picker_data['node'] = who
func _on_file_selected(path):
dprint(path)
func _on_Logo_gui_input(event) -> void:
# I should probably replace this with an "About Dialogic" dialog
if event is InputEventMouseButton and event.button_index == 1:
OS.shell_open("https://github.com/coppolaemilio/dialogic")
func dprint(what) -> void:
if debug_mode:
print(what)

View file

@ -0,0 +1,302 @@
[gd_scene load_steps=20 format=2]
[ext_resource path="res://addons/dialogic/Editor/EditorView.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/TimelineEditor/TimelineEditor.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Images/Toolbar/add-timeline.svg" type="Texture" id=3]
[ext_resource path="res://addons/dialogic/Images/Toolbar/add-character.svg" type="Texture" id=4]
[ext_resource path="res://addons/dialogic/Images/Toolbar/add-theme.svg" type="Texture" id=5]
[ext_resource path="res://addons/dialogic/Editor/SettingsEditor/SettingsEditor.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Editor/CharacterEditor/CharacterEditor.tscn" type="PackedScene" id=7]
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/ThemeEditor.tscn" type="PackedScene" id=8]
[ext_resource path="res://addons/dialogic/Images/open-icon.svg" type="Texture" id=9]
[ext_resource path="res://addons/dialogic/Images/closed-icon.svg" type="Texture" id=10]
[ext_resource path="res://addons/dialogic/Images/ActionCopy.svg" type="Texture" id=11]
[ext_resource path="res://addons/dialogic/Editor/DefinitionEditor/DefinitionEditor.tscn" type="PackedScene" id=12]
[ext_resource path="res://addons/dialogic/Images/Toolbar/add-definition.svg" type="Texture" id=13]
[ext_resource path="res://addons/dialogic/Images/logo.png" type="Texture" id=14]
[ext_resource path="res://addons/dialogic/Images/Remove.svg" type="Texture" id=22]
[ext_resource path="res://addons/dialogic/Images/Filesystem.svg" type="Texture" id=26]
[ext_resource path="res://addons/dialogic/Editor/MasterTree/MasterTree.tscn" type="PackedScene" id=35]
[sub_resource type="Image" id=3]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 3 )
size = Vector2( 16, 16 )
[node name="EditorView" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 8.0
margin_right = -8.0
margin_bottom = -8.0
rect_min_size = Vector2( 0, 200 )
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ToolBar" type="HBoxContainer" parent="."]
anchor_right = 1.0
margin_bottom = 30.0
custom_constants/separation = 0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="NewTimelineButton" type="Button" parent="ToolBar"]
self_modulate = Color( 0.870588, 0.870588, 0.870588, 1 )
margin_right = 34.0
margin_bottom = 30.0
hint_tooltip = "New Timeline"
focus_mode = 0
icon = ExtResource( 3 )
flat = true
[node name="NewCharactersButton" type="ToolButton" parent="ToolBar"]
self_modulate = Color( 0.870588, 0.870588, 0.870588, 1 )
margin_left = 34.0
margin_right = 68.0
margin_bottom = 30.0
hint_tooltip = "New Character"
focus_mode = 0
icon = ExtResource( 4 )
[node name="NewDefinitionButton" type="Button" parent="ToolBar"]
self_modulate = Color( 0.870588, 0.870588, 0.870588, 1 )
margin_left = 68.0
margin_right = 102.0
margin_bottom = 30.0
hint_tooltip = "New Definition"
focus_mode = 0
icon = ExtResource( 13 )
flat = true
[node name="NewThemeButton" type="Button" parent="ToolBar"]
self_modulate = Color( 0.870588, 0.870588, 0.870588, 1 )
margin_left = 102.0
margin_right = 136.0
margin_bottom = 30.0
hint_tooltip = "New Theme"
focus_mode = 0
icon = ExtResource( 5 )
flat = true
[node name="FoldTools" type="HBoxContainer" parent="ToolBar"]
visible = false
margin_left = 136.0
margin_right = 271.0
margin_bottom = 30.0
[node name="Label" type="Label" parent="ToolBar/FoldTools"]
margin_top = 8.0
margin_right = 59.0
margin_bottom = 22.0
text = " Fold "
[node name="ButtonFold" type="Button" parent="ToolBar/FoldTools"]
margin_left = 63.0
margin_right = 97.0
margin_bottom = 30.0
icon = ExtResource( 10 )
align = 0
[node name="ButtonUnfold" type="Button" parent="ToolBar/FoldTools"]
margin_left = 101.0
margin_right = 135.0
margin_bottom = 30.0
icon = ExtResource( 9 )
align = 0
[node name="Spacer" type="Control" parent="ToolBar"]
margin_left = 136.0
margin_right = 751.0
margin_bottom = 30.0
size_flags_horizontal = 3
[node name="Docs" type="ToolButton" parent="ToolBar"]
self_modulate = Color( 0.870588, 0.870588, 0.870588, 1 )
margin_left = 751.0
margin_right = 861.0
margin_bottom = 30.0
hint_tooltip = "Theme Editor"
mouse_default_cursor_shape = 2
text = "Online Docs"
icon = SubResource( 2 )
[node name="Logo" type="TextureRect" parent="ToolBar"]
margin_left = 861.0
margin_right = 981.0
margin_bottom = 30.0
rect_min_size = Vector2( 120, 0 )
mouse_default_cursor_shape = 2
texture = ExtResource( 14 )
expand = true
stretch_mode = 5
[node name="Version" type="Label" parent="ToolBar"]
self_modulate = Color( 1, 1, 1, 0.631373 )
margin_left = 981.0
margin_top = 8.0
margin_right = 1008.0
margin_bottom = 22.0
text = "v1.0"
[node name="MainPanel" type="HSplitContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 6.0
margin_top = 38.0
margin_right = -5.0
margin_bottom = -5.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MasterTree" parent="MainPanel" instance=ExtResource( 35 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 180.0
margin_bottom = 541.0
rect_min_size = Vector2( 180, 0 )
size_flags_vertical = 3
[node name="TimelineEditor" parent="MainPanel" instance=ExtResource( 2 )]
visible = false
[node name="CharacterEditor" parent="MainPanel" instance=ExtResource( 7 )]
visible = false
[node name="DefinitionEditor" parent="MainPanel" instance=ExtResource( 12 )]
visible = false
[node name="ThemeEditor" parent="MainPanel" instance=ExtResource( 8 )]
visible = false
[node name="SettingsEditor" parent="MainPanel" instance=ExtResource( 6 )]
visible = false
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 192.0
margin_right = 1253.0
margin_bottom = 661.0
[node name="Empty" type="CenterContainer" parent="MainPanel"]
margin_left = 192.0
margin_right = 997.0
margin_bottom = 541.0
[node name="VBoxContainer" type="VBoxContainer" parent="MainPanel/Empty"]
margin_left = 262.0
margin_top = 263.0
margin_right = 542.0
margin_bottom = 277.0
[node name="Label" type="Label" parent="MainPanel/Empty/VBoxContainer"]
margin_right = 280.0
margin_bottom = 14.0
text = "Select or create an element to start working"
[node name="TimelinePopupMenu" type="PopupMenu" parent="."]
margin_left = 151.0
margin_top = 276.0
margin_right = 325.0
margin_bottom = 332.0
items = [ "Show in File Manager", ExtResource( 26 ), 0, false, false, 0, 0, null, "", false, "Copy Timeline Name", ExtResource( 11 ), 0, false, false, 1, 0, null, "", false, "Remove", ExtResource( 22 ), 0, false, false, 2, 0, null, "", false ]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CharacterPopupMenu" type="PopupMenu" parent="."]
margin_left = 171.799
margin_top = 209.0
margin_right = 267.799
margin_bottom = 229.0
items = [ "Show in File Manager", ExtResource( 26 ), 0, false, false, 0, 0, null, "", false, "Remove Character", ExtResource( 22 ), 0, false, false, 1, 0, null, "", false ]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ThemePopupMenu" type="PopupMenu" parent="."]
margin_left = 171.799
margin_top = 209.0
margin_right = 267.799
margin_bottom = 229.0
items = [ "Show in File Manager", ExtResource( 26 ), 0, false, false, 0, 0, null, "", false, "Remove Theme", ExtResource( 22 ), 0, false, false, 1, 0, null, "", false ]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DefinitionPopupMenu" type="PopupMenu" parent="."]
margin_left = 171.799
margin_top = 209.0
margin_right = 267.799
margin_bottom = 229.0
items = [ "Edit definitions file", ExtResource( 26 ), 0, false, false, 0, 0, null, "", false, "Remove Definition", ExtResource( 22 ), 0, false, false, 1, 0, null, "", false ]
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveCharacterConfirmation" type="ConfirmationDialog" parent="."]
margin_right = 325.0
margin_bottom = 88.0
rect_min_size = Vector2( 250, 87.5 )
dialog_text = "Are you sure you want to remove this character?
(Can't be restored)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveDefinitionConfirmation" type="ConfirmationDialog" parent="."]
margin_right = 325.0
margin_bottom = 88.0
rect_min_size = Vector2( 250, 87.5 )
dialog_text = "Are you sure you want to remove this definition?
(Can't be restored)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveThemeConfirmation" type="ConfirmationDialog" parent="."]
margin_right = 325.0
margin_bottom = 88.0
rect_min_size = Vector2( 250, 87.5 )
dialog_text = "Are you sure you want to remove this theme?
(Can't be restored)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveGlossaryConfirmation" type="ConfirmationDialog" parent="."]
margin_right = 325.0
margin_bottom = 88.0
rect_min_size = Vector2( 250, 87.5 )
dialog_text = "Are you sure you want to remove this entry?
(Can't be restored)"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RemoveTimelineConfirmation" type="ConfirmationDialog" parent="."]
margin_right = 325.0
margin_bottom = 88.0
rect_min_size = Vector2( 250, 87.5 )
dialog_text = "Are you sure you want to remove this timeline?
(Can't be restored)"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="gui_input" from="ToolBar/Logo" to="." method="_on_Logo_gui_input"]

View file

@ -0,0 +1,250 @@
tool
extends Tree
onready var editor_reference = get_node('../..')
onready var timeline_editor = get_node('../TimelineEditor')
onready var character_editor = get_node('../CharacterEditor')
onready var definition_editor = get_node('../DefinitionEditor')
onready var settings_editor = get_node('../SettingsEditor')
onready var theme_editor = get_node('../ThemeEditor')
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 timelines_tree
var characters_tree
var definitions_tree
var themes_tree
var settings_tree
func _ready():
allow_rmb_select = true
var root = tree.create_item()
tree.set_hide_root(true)
# Creating the parents
timelines_tree = tree.create_item(root)
timelines_tree.set_selectable(0, false)
timelines_tree.set_text(0, "Timelines")
#timelines_tree.set_icon(0, get_icon("Folder", "EditorIcons"))
characters_tree = tree.create_item(root)
characters_tree.set_selectable(0, false)
characters_tree.set_text(0, "Characters")
#characters_tree.set_icon(0, get_icon("Folder", "EditorIcons"))
definitions_tree = tree.create_item(root)
definitions_tree.set_selectable(0, false)
definitions_tree.set_text(0, "Definitions")
#definitions_tree.set_icon(0, get_icon("Folder", "EditorIcons"))
themes_tree = tree.create_item(root)
themes_tree.set_selectable(0, false)
themes_tree.set_text(0, "Themes")
#themes_tree.set_icon(0, get_icon("Folder", "EditorIcons"))
settings_tree = tree.create_item(root)
settings_tree.set_selectable(0, true)
settings_tree.set_text(0, "Settings")
settings_tree.set_icon(0, get_icon("GDScript", "EditorIcons"))
settings_tree.set_metadata(0, {'editor': 'Settings'})
connect('item_selected', self, '_on_item_selected')
connect('item_rmb_selected', self, '_on_item_rmb_selected')
connect('gui_input', self, '_on_gui_input')
connect('item_edited', self, '_on_item_edited')
$RenamerReset.connect("timeout", self, '_on_renamer_reset_timeout')
#var subchild1 = tree.create_item(timelines_tree)
#subchild1.set_text(0, "Subchild1")
# Adding timelines
for t in DialogicUtil.get_timeline_list():
add_timeline(t)
# Adding characters
for c in DialogicUtil.get_character_list():
add_character(c)
# Adding Definitions
for d in DialogicUtil.get_definition_list():
add_definition(d)
# Adding Themes
for m in DialogicUtil.get_theme_list():
add_theme(m)
# Default empty screen.
hide_all_editors(true)
# AutoSave timer
$AutoSave.connect("timeout", self, '_on_autosave_timeout')
$AutoSave.start(0.5)
func add_timeline(timeline, select = false):
var item = tree.create_item(timelines_tree)
item.set_icon(0, timeline_icon)
if timeline.has('name'):
item.set_text(0, timeline['name'])
else:
item.set_text(0, timeline['file'])
timeline['editor'] = 'Timeline'
item.set_metadata(0, timeline)
#item.set_editable(0, true)
if select: # Auto selecting
item.select(0)
func add_theme(theme_item, select = false):
var item = tree.create_item(themes_tree)
item.set_icon(0, get_icon("StyleBoxTexture", "EditorIcons"))
item.set_text(0, theme_item['name'])
theme_item['editor'] = 'Theme'
item.set_metadata(0, theme_item)
#item.set_editable(0, true)
if select: # Auto selecting
item.select(0)
func add_character(character, select = false):
var item = tree.create_item(characters_tree)
item.set_icon(0, character_icon)
if character.has('name'):
item.set_text(0, character['name'])
else:
item.set_text(0, character['file'])
character['editor'] = 'Character'
item.set_metadata(0, character)
#item.set_editable(0, true)
if character.has('color'):
item.set_icon_modulate(0, character['color'])
# Auto selecting
if select:
item.select(0)
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"))
if definition['type'] == 1:
item.set_icon(0, get_icon("ScriptCreateDialog", "EditorIcons"))
definition['editor'] = 'Definition'
item.set_metadata(0, definition)
if select: # Auto selecting
item.select(0)
func _on_item_selected():
# TODO: Ideally I would perform a "save" here before opening the next
# resource. Unfortunately there has been so many bugs doing that
# that I'll revisit it in the future.
# save_current_resource()
var item = get_selected()
var metadata = item.get_metadata(0)
hide_all_editors()
if metadata['editor'] == 'Timeline':
timeline_editor.visible = true
timeline_editor.load_timeline(DialogicUtil.get_path('TIMELINE_DIR', metadata['file']))
if metadata['editor'] == 'Character':
character_editor.visible = true
character_editor.load_character(DialogicUtil.get_path('CHAR_DIR', metadata['file']))
if metadata['editor'] == 'Definition':
definition_editor.visible = true
definition_editor.load_definition(metadata['section'])
if metadata['editor'] == 'Theme':
theme_editor.load_theme(metadata['file'])
theme_editor.visible = true
if metadata['editor'] == 'Settings':
settings_editor.update_data()
settings_editor.visible = true
func hide_all_editors(show_empty = false):
character_editor.visible = false
timeline_editor.visible = false
definition_editor.visible = false
theme_editor.visible = false
empty_editor.visible = false
settings_editor.visible = false
if show_empty:
empty_editor.visible = true
func _on_item_rmb_selected(position):
var item = get_selected().get_metadata(0)
if item['editor'] == 'Timeline':
editor_reference.get_node('TimelinePopupMenu').rect_position = get_viewport().get_mouse_position()
editor_reference.get_node('TimelinePopupMenu').popup()
if item['editor'] == 'Character':
editor_reference.get_node("CharacterPopupMenu").rect_position = get_viewport().get_mouse_position()
editor_reference.get_node("CharacterPopupMenu").popup()
if item['editor'] == 'Theme':
editor_reference.get_node("ThemePopupMenu").rect_position = get_viewport().get_mouse_position()
editor_reference.get_node("ThemePopupMenu").popup()
if item['editor'] == 'Definition':
editor_reference.get_node("DefinitionPopupMenu").rect_position = get_viewport().get_mouse_position()
editor_reference.get_node("DefinitionPopupMenu").popup()
func remove_selected():
var item = get_selected()
item.free()
timelines_tree.select(0)
settings_editor.update_data()
func refresh_timeline_list():
print('update timeline list')
func _on_renamer_reset_timeout():
get_selected().set_editable(0, false)
func _on_gui_input(event):
if event is InputEventMouseButton and event.button_index == 1:
if event.is_pressed() and event.doubleclick:
var item = get_selected()
var metadata = item.get_metadata(0)
item.set_editable(0, true)
$RenamerReset.start(0.5)
func _on_item_edited():
var item = get_selected()
var metadata = item.get_metadata(0)
if metadata['editor'] == 'Timeline':
timeline_editor.timeline_name = item.get_text(0)
if metadata['editor'] == 'Theme':
DialogicUtil.set_theme_value(metadata['file'], 'settings', 'name', item.get_text(0))
if metadata['editor'] == 'Character':
character_editor.nodes['name'].text = item.get_text(0)
if metadata['editor'] == 'Definition':
definition_editor.nodes['name'].text = item.get_text(0)
# Not sure why this signal doesn't triggers
definition_editor._on_name_changed(item.get_text(0))
func _on_autosave_timeout():
save_current_resource()
func save_current_resource():
var root = get_node('../..') # This is the same as the editor_reference
if root.visible: #Only save if the editor is open
var item: TreeItem = get_selected()
var metadata: Dictionary
if item != null:
metadata = item.get_metadata(0)
if metadata['editor'] == 'Timeline':
timeline_editor.save_timeline()
if metadata['editor'] == 'Character':
character_editor.save_character()
if metadata['editor'] == 'Definition':
definition_editor.save_definition()
# Note: Theme files auto saves on change

View file

@ -0,0 +1,18 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/MasterTree/MasterTree.gd" type="Script" id=1]
[node name="MasterTree" type="Tree"]
anchor_right = 1.0
anchor_bottom = 1.0
allow_rmb_select = true
hide_root = true
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RenamerReset" type="Timer" parent="."]
one_shot = true
[node name="AutoSave" type="Timer" parent="."]

View file

@ -0,0 +1,48 @@
tool
extends Control
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 = {
'audio': 'play',
'file': ''
}
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):
$PanelContainer/VBoxContainer/Header/Name.text = path
$PanelContainer/VBoxContainer/Header/ButtonPreviewPlay.disabled = false
event_data['file'] = path
func load_data(data):
event_data = data
if data['file'] != '':
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

View file

@ -0,0 +1,119 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/AudioBlock.gd" type="Script" id=1]
[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]
[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.580392, 0.286275, 0.227451, 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="AudioBlock" 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 = 83.0
margin_bottom = 21.0
text = " Audio "
[node name="Name" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 87.0
margin_top = 7.0
margin_right = 87.0
margin_bottom = 21.0
[node name="ButtonAudio" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 91.0
margin_right = 115.0
margin_bottom = 28.0
text = "..."
[node name="ButtonPreviewPlay" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 119.0
margin_right = 153.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" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 157.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[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/ButtonPreviewPlay" to="." method="_on_ButtonPreviewPlay_pressed"]
[connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

View file

@ -0,0 +1,29 @@
tool
extends Control
var editor_reference
var editorPopup
var event_data = {
'change_scene': ''
}
func _on_ButtonScenePicker_pressed():
editor_reference.godot_dialog("*.tscn")
editor_reference.godot_dialog_connect(self, "_on_file_selected")
func _on_file_selected(path, target):
target.select_scene(path)
func select_scene(path):
$PanelContainer/VBoxContainer/Header/Name.text = path
event_data['change_scene'] = path
func load_data(data):
event_data = data
if data['change_scene'] != '':
select_scene(data['change_scene'])

View file

@ -0,0 +1,110 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/ChangeScene.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Images/change-scene.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/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=6]
[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.14902, 0.333333, 0.509804, 0.4 )
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="ChangeScene" 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 = 134.0
margin_bottom = 21.0
text = " Change Scene "
[node name="Name" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 138.0
margin_top = 7.0
margin_right = 138.0
margin_bottom = 21.0
[node name="ButtonScenePicker" type="Button" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 142.0
margin_right = 166.0
margin_bottom = 28.0
text = "..."
[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" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 170.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[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/ButtonScenePicker" to="." method="_on_ButtonScenePicker_pressed"]
[connection signal="finished" from="PanelContainer/AudioPreview" to="." method="_on_AudioPreview_finished"]

View file

@ -0,0 +1,43 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'change_timeline': ''
}
func _ready():
$PanelContainer/VBoxContainer/Header/MenuButton.get_popup().connect("index_pressed", self, '_on_timeline_selected')
func load_data(data):
event_data = data
if event_data['change_timeline'] != '':
for c in DialogicUtil.get_timeline_list():
if c['file'] == event_data['change_timeline']:
$PanelContainer/VBoxContainer/Header/MenuButton.text = c['name']
func _on_MenuButton_about_to_show():
var Dropdown = $PanelContainer/VBoxContainer/Header/MenuButton
Dropdown.get_popup().clear()
var index = 0
for c in DialogicUtil.get_timeline_list():
if c['file'].replace('.json', '') == DialogicUtil.get_filename_from_path(editor_reference.get_node('MainPanel/TimelineEditor').working_timeline_file):
Dropdown.get_popup().add_item('(Current) ' + c['name'])
else:
Dropdown.get_popup().add_item(c['name'])
Dropdown.get_popup().set_item_metadata(index, {'file': c['file'], 'color': c['color']})
index += 1
func _on_timeline_selected(index):
var text = $PanelContainer/VBoxContainer/Header/MenuButton.get_popup().get_item_text(index)
var metadata = $PanelContainer/VBoxContainer/Header/MenuButton.get_popup().get_item_metadata(index)
$PanelContainer/VBoxContainer/Header/MenuButton.text = text
event_data['change_timeline'] = metadata['file']

View file

@ -0,0 +1,97 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/ChangeTimeline.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Images/change-timeline.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/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
[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.435294, 0.301961, 0.603922, 0.192157 )
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="ChangeTimelineBlock" 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_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1798.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 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 = 140.0
margin_bottom = 21.0
text = " Change Timeline"
[node name="MenuButton" type="MenuButton" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 144.0
margin_right = 263.0
margin_bottom = 28.0
text = "[Select Timeline]"
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 267.0
margin_top = 7.0
margin_right = 267.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 271.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[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="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="about_to_show" from="PanelContainer/VBoxContainer/Header/MenuButton" to="." method="_on_MenuButton_about_to_show"]

View file

@ -0,0 +1,87 @@
tool
extends Control
var editor_reference
onready var portrait_picker = $PanelContainer/VBoxContainer/Header/PortraitPicker
var current_color = Color('#ffffff')
var default_icon_color = Color("#65989898")
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'action': 'join',
'character': '',
'portrait': '',
'position': {"0":false,"1":false,"2":false,"3":false,"4":false}
}
func _ready():
for p in $PanelContainer/VBoxContainer/Header/PositionsContainer.get_children():
p.connect('pressed', self, "position_button_pressed", [p.name])
$PanelContainer/VBoxContainer/Header/CharacterPicker.connect('character_selected', self , '_on_character_selected')
portrait_picker.get_popup().connect("index_pressed", self, '_on_portrait_selected')
portrait_picker.allow_dont_change = false
func _on_character_selected(data):
# Updating icon Color
current_color = Color(data['color'])
var c_c_ind = 0
for p in $PanelContainer/VBoxContainer/Header/PositionsContainer.get_children():
if event_data['position'][str(c_c_ind)]:
p.set('self_modulate', Color(data['color']))
else:
p.set('self_modulate', default_icon_color)
c_c_ind += 1
event_data['character'] = data['file']
portrait_picker.set_character(event_data['character'], event_data['portrait'])
portrait_picker.text = 'Default'
func _on_portrait_selected(index):
var text = portrait_picker.get_popup().get_item_text(index)
if portrait_picker.allow_dont_change:
if text == "[Don't change]":
text = ''
event_data['portrait'] = text
portrait_picker.set_character(event_data['character'], event_data['portrait'])
func position_button_pressed(name):
clear_all_positions()
var selected_index = name.split('-')[1]
var button = $PanelContainer/VBoxContainer/Header/PositionsContainer.get_node('position-' + selected_index)
button.set('self_modulate', Color("#ffffff"))
button.set('self_modulate', current_color)
button.pressed = true
event_data['position'][selected_index] = true
func clear_all_positions():
for i in range(5):
event_data['position'][str(i)] = false
for p in $PanelContainer/VBoxContainer/Header/PositionsContainer.get_children():
p.set('self_modulate', default_icon_color)
p.pressed = false
func check_active_position(active_color = Color("#ffffff")):
var index = 0
for p in $PanelContainer/VBoxContainer/Header/PositionsContainer.get_children():
if event_data['position'][str(index)]:
p.pressed = true
p.set('self_modulate', active_color)
index += 1
func load_data(data):
event_data = data
if data['character'] != '':
var character_data = DialogicUtil.load_json(DialogicUtil.get_path('CHAR_DIR', data['character']))
$PanelContainer/VBoxContainer/Header/CharacterPicker.set_data(character_data['name'], Color(character_data['color']))
portrait_picker.set_character(data['character'], data['portrait'])
current_color = Color(character_data['color'])
check_active_position(current_color)
return
check_active_position()

View file

@ -0,0 +1,138 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/CharacterJoinBlock.gd" type="Script" id=3]
[ext_resource path="res://addons/dialogic/Images/character-join.svg" type="Texture" id=4]
[ext_resource path="res://addons/dialogic/Images/character.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/Editor/Pieces/Common/PortraitPicker.tscn" type="PackedScene" id=7]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/CharacterPicker.tscn" type="PackedScene" id=8]
[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.14902, 0.521569, 0.298039, 0.266667 )
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="CharacterJoinBlock" type="HBoxContainer"]
margin_right = 1798.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 44.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 = 30.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 30.0
texture = ExtResource( 4 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 8.0
margin_right = 130.0
margin_bottom = 22.0
text = " Character join: "
[node name="CharacterPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 8 )]
margin_left = 134.0
margin_right = 240.0
[node name="PortraitPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
visible = false
margin_left = 278.0
margin_right = 361.0
[node name="LabelPosition" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 244.0
margin_top = 8.0
margin_right = 308.0
margin_bottom = 22.0
text = " Position:"
[node name="PositionsContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 312.0
margin_right = 498.0
margin_bottom = 30.0
[node name="position-0" type="ToolButton" parent="PanelContainer/VBoxContainer/Header/PositionsContainer"]
self_modulate = Color( 0.596078, 0.596078, 0.596078, 0.396078 )
margin_right = 34.0
margin_bottom = 30.0
icon = ExtResource( 5 )
[node name="position-1" type="ToolButton" parent="PanelContainer/VBoxContainer/Header/PositionsContainer"]
self_modulate = Color( 0.596078, 0.596078, 0.596078, 0.396078 )
margin_left = 38.0
margin_right = 72.0
margin_bottom = 30.0
icon = ExtResource( 5 )
[node name="position-2" type="ToolButton" parent="PanelContainer/VBoxContainer/Header/PositionsContainer"]
self_modulate = Color( 0.596078, 0.596078, 0.596078, 0.396078 )
margin_left = 76.0
margin_right = 110.0
margin_bottom = 30.0
icon = ExtResource( 5 )
[node name="position-3" type="ToolButton" parent="PanelContainer/VBoxContainer/Header/PositionsContainer"]
self_modulate = Color( 0.596078, 0.596078, 0.596078, 0.396078 )
margin_left = 114.0
margin_right = 148.0
margin_bottom = 30.0
icon = ExtResource( 5 )
[node name="position-4" type="ToolButton" parent="PanelContainer/VBoxContainer/Header/PositionsContainer"]
self_modulate = Color( 0.596078, 0.596078, 0.596078, 0.396078 )
margin_left = 152.0
margin_right = 186.0
margin_bottom = 30.0
icon = ExtResource( 5 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 502.0
margin_right = 1735.0
margin_bottom = 30.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
margin_left = 1739.0
margin_right = 1776.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( 6 )]

View file

@ -0,0 +1,42 @@
tool
extends Control
var editor_reference
var character_selected = ''
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'action': 'leaveall',
'character': '[All]',
}
func _ready():
$PanelContainer/VBoxContainer/Header/CharacterDropdown.get_popup().connect("index_pressed", self, '_on_character_selected')
func _on_CharacterDropdown_about_to_show():
var Dropdown = $PanelContainer/VBoxContainer/Header/CharacterDropdown
Dropdown.get_popup().clear()
Dropdown.get_popup().add_item("[All]")
var index = 1
for c in DialogicUtil.get_character_list():
Dropdown.get_popup().add_item(c['name'])
Dropdown.get_popup().set_item_metadata(index, {'file': c['file'], 'color': c['color']})
index += 1
func _on_character_selected(index):
var text = $PanelContainer/VBoxContainer/Header/CharacterDropdown.get_popup().get_item_text(index)
var metadata = $PanelContainer/VBoxContainer/Header/CharacterDropdown.get_popup().get_item_metadata(index)
$PanelContainer/VBoxContainer/Header/CharacterDropdown.text = text
event_data['character'] = metadata['file']
func load_data(data):
event_data = data
if data['character'] != '[All]':
if data['character'] != '':
var character_data = DialogicUtil.load_json(DialogicUtil.get_path('CHAR_DIR', data['character']))
if character_data.has('name'):
$PanelContainer/VBoxContainer/Header/CharacterDropdown.text = character_data['name']

View file

@ -0,0 +1,105 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/CharacterLeaveBlock.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Images/character-leave.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/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
[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.419608, 0.14902, 0.262745, 0.219608 )
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="CharacterBlock" 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 = 135.0
margin_bottom = 21.0
text = " Character Leave"
[node name="CharacterDropdown" type="MenuButton" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 139.0
margin_right = 239.0
margin_bottom = 28.0
rect_min_size = Vector2( 100, 0 )
text = "[All]"
flat = false
align = 0
items = [ "All", null, 0, false, false, 0, 0, null, "", false ]
[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" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 243.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[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="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="about_to_show" from="PanelContainer/VBoxContainer/Header/CharacterDropdown" to="." method="_on_CharacterDropdown_about_to_show"]

View file

@ -0,0 +1,30 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'choice': ''
}
func _ready():
$PanelContainer/VBoxContainer/Header/Warning.visible = false
$PanelContainer/VBoxContainer/Header/CustomLineEdit.connect('text_changed', self, '_on_LineEdit_text_changed')
pass
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/CustomLineEdit.text = event_data['choice']
func _on_LineEdit_text_changed(new_text):
event_data['choice'] = new_text
func _on_Indent_visibility_changed():
$PanelContainer/VBoxContainer/Header/Warning.visible = !$Indent.visible

View file

@ -0,0 +1,115 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://addons/dialogic/Images/choice.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Choice.gd" type="Script" id=2]
[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/Images/warning.svg" type="Texture" id=6]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/CustomLineEdit.tscn" type="PackedScene" 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.243137, 0.231373, 0.396078, 0.772549 )
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="Choice" type="HBoxContainer"]
margin_right = 1004.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="Warning" type="ToolButton" parent="PanelContainer/VBoxContainer/Header"]
visible = false
margin_right = 34.0
margin_bottom = 30.0
hint_tooltip = "Choice events should go
between a [Question]
and [End branch] events.
[Question]
[Choice]
[...]
[End branch]"
icon = ExtResource( 6 )
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 46.0
margin_bottom = 21.0
text = " "
[node name="CustomLineEdit" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
margin_left = 50.0
margin_right = 98.0
margin_bottom = 28.0
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 102.0
margin_top = 7.0
margin_right = 102.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 106.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="visibility_changed" from="Indent" to="." method="_on_Indent_visibility_changed"]

View file

@ -0,0 +1,18 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'close_dialog': ''
}
func _ready():
pass
func load_data(data):
event_data = data

View file

@ -0,0 +1,89 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/dialogic/Images/end-dialog.svg" type="Texture" id=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/dialogic/Editor/Pieces/CloseDialog.gd" type="Script" id=4]
[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.419608, 0.14902, 0.262745, 0.219608 )
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="CloseDialog" type="HBoxContainer"]
margin_right = 1798.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1798.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 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( 2 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 113.0
margin_bottom = 21.0
text = " Close Dialog"
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 117.0
margin_top = 7.0
margin_right = 117.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 121.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 3 )]
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="DragController" parent="." instance=ExtResource( 1 )]

View file

@ -0,0 +1,46 @@
tool
extends HBoxContainer
signal character_selected(value)
func _ready():
$Dropdown.get_popup().connect("index_pressed", self, '_on_character_selected')
func _on_Dropdown_about_to_show():
var popup = $Dropdown.get_popup()
popup.clear()
popup.add_item('No Character')
popup.set_item_metadata(0, {'file': '', 'color': Color('#ffffff')})
var index = 1
for c in DialogicUtil.get_character_list():
popup.add_item(c['name'])
popup.set_item_metadata(index, {'file': c['file'],'color': c['color']})
index += 1
func _on_character_selected(index: int):
var data = {'file': '', 'color': Color('#FFFFFF')}
if index == 0:
set_data('[Character]', Color('#FFFFFF'))
else:
var metadata = $Dropdown.get_popup().get_item_metadata(index)
set_data($Dropdown.get_popup().get_item_text(index), metadata['color'])
data['file'] = metadata['file']
data['color'] = metadata['color']
emit_signal('character_selected', data)
return data
func set_data_by_file(file_name):
# This method is used when you don't know the character's color
var character = DialogicUtil.load_json(DialogicUtil.get_path('CHAR_DIR', file_name))
set_data(character['name'], Color(character['color']))
func set_data(text: String, color:Color = Color('#FFFFFF')) -> void:
$Dropdown.text = text
$Icon.set("self_modulate", Color(color))

View file

@ -0,0 +1,31 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Images/character.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/CharacterPicker.gd" type="Script" id=2]
[node name="CharacterPicker" type="HBoxContainer"]
margin_right = 106.0
margin_bottom = 30.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Icon" type="TextureRect" parent="."]
margin_right = 22.0
margin_bottom = 30.0
texture = ExtResource( 1 )
stretch_mode = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dropdown" type="MenuButton" parent="."]
margin_left = 26.0
margin_right = 106.0
margin_bottom = 30.0
focus_mode = 2
text = "[Character]"
flat = false
[connection signal="about_to_show" from="Dropdown" to="." method="_on_Dropdown_about_to_show"]

View file

@ -0,0 +1,30 @@
[gd_scene load_steps=2 format=2]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.745098, 0.745098, 0.745098, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_left = 5.0
expand_margin_right = 5.0
[node name="CustomLineEdit" type="LineEdit"]
margin_right = 48.0
margin_bottom = 30.0
custom_styles/read_only = SubResource( 1 )
custom_styles/focus = SubResource( 1 )
custom_styles/normal = SubResource( 1 )
custom_colors/selection_color = Color( 0.345098, 0.345098, 0.345098, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color_pressed = Color( 0, 0, 0, 1 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_uneditable = Color( 0, 0, 0, 1 )
expand_to_text_length = true
caret_blink = true
caret_blink_speed = 0.5
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,36 @@
tool
extends MenuButton
var default_text = '[ Select a definition ]'
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 d in DialogicUtil.get_definition_list():
if d['type'] == 0:
get_popup().add_item(d['name'])
get_popup().set_item_metadata(index, {
'section': d['section'],
})
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_definition(section):
if section != '':
for d in DialogicUtil.get_definition_list():
if d['section'] == section:
text = d['name']
else:
text = default_text

View file

@ -0,0 +1,23 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DefinitionPicker.gd" type="Script" id=1]
[node name="DefinitionPicker" type="MenuButton"]
margin_right = 157.0
margin_bottom = 30.0
focus_mode = 2
text = "[ Select a definition ]"
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="."]
self_modulate = Color( 0.45098, 0.45098, 0.45098, 0.329412 )
show_behind_parent = true
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,27 @@
tool
extends Control
var moving
func _ready():
get_parent().connect("gui_input", self, '_on_gui_input')
func _process(delta):
if moving:
var current_position = get_global_mouse_position()
var movement_offset = 15
var height = get_parent().get_node("PanelContainer").rect_size.y + movement_offset
var node_position = get_parent().rect_global_position.y
if current_position.y < node_position - movement_offset:
get_parent().get_node("PanelContainer/VBoxContainer/Header/OptionButton")._on_OptionSelected(0)
if current_position.y > node_position + height:
get_parent().get_node("PanelContainer/VBoxContainer/Header/OptionButton")._on_OptionSelected(1)
func _on_gui_input(event):
if event is InputEventMouseButton and event.button_index == 1:
if moving:
moving = false
else:
moving = true

View file

@ -0,0 +1,10 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.gd" type="Script" id=1]
[node name="DragController" type="Control"]
visible = false
margin_left = 1024.0
margin_right = 1024.0
margin_bottom = 126.0
script = ExtResource( 1 )

View file

@ -0,0 +1,25 @@
tool
extends MenuButton
var current_piece
func _ready():
# Gotta love the nodes system some times
# Praise the paths (っ´ω`c)♡
current_piece = get_parent().get_parent().get_parent().get_parent()
var popup = get_popup()
popup.connect("index_pressed", self, "_on_OptionSelected")
func _on_OptionSelected(index):
if index == 0:
# Moving this up
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'up')
elif index == 1:
# Moving piece down
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').move_block(current_piece, 'down')
elif index == 3:
# Removing a piece
# TODO: Add a warning here if the event has changes
current_piece.queue_free()
current_piece.editor_reference.get_node('MainPanel/TimelineEditor').indent_events()

View file

@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Images/expand-icon.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.gd" type="Script" id=2]
[node name="OptionButton" type="MenuButton"]
margin_left = 1749.0
margin_right = 1786.0
margin_bottom = 30.0
text = "Item 0"
icon = ExtResource( 1 )
clip_text = true
align = 2
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 ]
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,44 @@
tool
extends MenuButton
var character
var portrait
var allow_dont_change:bool = true
func _ready():
visible = false
connect("about_to_show", self, '_on_about_to_show')
if allow_dont_change == false:
text = 'Default'
func set_character(c: String, p: String = '') -> void:
character = c
portrait = p
visible = false
for c in DialogicUtil.get_character_list():
if c['file'] == character:
if c.has('portraits'):
if c['portraits'].size() > 1:
visible = true
for p in c['portraits']:
if p['name'] == portrait:
text = portrait
if allow_dont_change:
if p == "[Don't change]":
text = ''
func _on_about_to_show():
get_popup().clear()
var index = 0
if allow_dont_change:
get_popup().add_item("[Don't change]")
index += 1
for c in DialogicUtil.get_character_list():
if c['file'] == character:
for p in c['portraits']:
get_popup().add_item(p['name'])
index += 1

View file

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/dialogic/Images/Portrait.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PortraitPicker.gd" type="Script" id=2]
[node name="PortraitPicker" type="MenuButton"]
margin_right = 34.0
margin_bottom = 30.0
focus_mode = 2
icon = ExtResource( 1 )
flat = false
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,44 @@
tool
extends CheckBox
var current_piece
var is_disabled = false
func _ready():
# Gotta love the nodes system some times
# Praise the paths (っ´ω`c)♡
current_piece = get_parent().get_parent().get_parent().get_parent()
connect("toggled", self, "_on_VisibleToggle_toggled")
func disabled():
self_modulate = Color(0,0,0,0)
is_disabled = true
func _on_VisibleToggle_toggled(button_pressed):
if is_disabled:
return
var current_rect_size = current_piece.get("rect_size")
if button_pressed:
current_piece.get_node("PanelContainer/VBoxContainer/Header/Preview").hide()
var index = 0
for node in current_piece.get_node("PanelContainer/VBoxContainer").get_children():
if index > 0:
node.show()
index += 1
else:
if current_piece.has_node("PanelContainer/VBoxContainer/Header/Preview"):
current_piece.get_node("PanelContainer/VBoxContainer/Header/Preview").show()
var index = 0
for node in current_piece.get_node("PanelContainer/VBoxContainer").get_children():
if index > 0:
node.hide()
index += 1
if "preview" in current_piece:
current_piece.get_node("PanelContainer/VBoxContainer/Header/Preview").text = current_piece.preview
current_piece.set("rect_size", Vector2(current_rect_size.x,0))
release_focus()

View file

@ -0,0 +1,17 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/dialogic/Images/open-icon.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Images/closed-icon.svg" type="Texture" id=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/VisibleToggle.gd" type="Script" id=3]
[node name="VisibleToggle" type="CheckBox"]
margin_right = 30.0
margin_bottom = 30.0
custom_icons/checked = ExtResource( 1 )
custom_icons/unchecked = ExtResource( 2 )
pressed = true
flat = true
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -0,0 +1,20 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'emit_signal': ''
}
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/LineEdit.text = event_data['emit_signal']
func _on_LineEdit_text_changed(new_text):
event_data['emit_signal'] = new_text

View file

@ -0,0 +1,121 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/dialogic/Images/signal.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/EmitSignal.gd" type="Script" id=2]
[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]
[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.14902, 0.333333, 0.509804, 0.4 )
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
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.745098, 0.745098, 0.745098, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_left = 5.0
expand_margin_right = 5.0
[node name="EmitSignal" type="HBoxContainer"]
margin_right = 1004.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 124.0
margin_bottom = 21.0
text = " Emit Signal "
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 128.0
margin_right = 176.0
margin_bottom = 28.0
custom_styles/read_only = SubResource( 2 )
custom_styles/focus = SubResource( 2 )
custom_styles/normal = SubResource( 2 )
custom_colors/selection_color = Color( 0.345098, 0.345098, 0.345098, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color_pressed = Color( 0, 0, 0, 1 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_uneditable = Color( 0, 0, 0, 1 )
expand_to_text_length = true
caret_blink = true
caret_blink_speed = 0.5
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 180.0
margin_top = 7.0
margin_right = 180.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 184.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="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,14 @@
tool
extends Control
var editor_reference
var editorPopup
var event_data = {
'endbranch': ''
}
func load_data(data):
event_data = data

View file

@ -0,0 +1,92 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/dialogic/Editor/Pieces/EndBranch.gd" type="Script" id=4]
[ext_resource path="res://addons/dialogic/Images/end-choice.svg" type="Texture" id=5]
[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.243137, 0.231373, 0.396078, 0.772549 )
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="EndBranch" type="HBoxContainer"]
anchor_left = 0.043
anchor_right = 0.063
margin_left = -44.032
margin_right = 959.968
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1024.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 1018.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 1002.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 5 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 105.0
margin_bottom = 21.0
text = " End Branch"
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 109.0
margin_top = 7.0
margin_right = 109.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 113.0
margin_right = 961.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 1 )]
margin_left = 965.0
margin_right = 1002.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="DragController" parent="." instance=ExtResource( 3 )]

View file

@ -0,0 +1,36 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'condition': '',
'definition': '',
'value': ''
}
onready var nodes = {
'definition_picker': $PanelContainer/VBoxContainer/Header/DefinitionPicker,
}
func _ready():
nodes['definition_picker'].get_popup().connect("index_pressed", self, '_on_definition_entry_selected')
$PanelContainer/VBoxContainer/Header/CustomLineEdit.connect("text_changed", self, '_on_text_changed')
func _on_text_changed(new_text):
event_data['value'] = new_text
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/CustomLineEdit.text = event_data['value']
nodes['definition_picker'].load_definition(data['definition'])
func _on_definition_entry_selected(index):
var metadata = nodes['definition_picker'].get_popup().get_item_metadata(index)
event_data['definition'] = metadata['section']

View file

@ -0,0 +1,103 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://addons/dialogic/Images/condition.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/IfCondition.gd" type="Script" id=2]
[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/CustomLineEdit.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DefinitionPicker.tscn" type="PackedScene" 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.243137, 0.231373, 0.396078, 0.772549 )
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="IfCondition" type="HBoxContainer"]
margin_right = 1004.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="DefinitionPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
margin_left = 26.0
margin_right = 169.0
margin_bottom = 28.0
[node name="MenuButton2" type="MenuButton" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 173.0
margin_right = 252.0
margin_bottom = 28.0
text = "[ Equal to ]"
[node name="CustomLineEdit" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 6 )]
margin_left = 256.0
margin_right = 304.0
margin_bottom = 28.0
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 308.0
margin_top = 7.0
margin_right = 308.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 312.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="DragController" parent="." instance=ExtResource( 5 )]

View file

@ -0,0 +1,21 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'question': '',
'options': []
}
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/LineEdit.text = event_data['question']
func _on_LineEdit_text_changed(new_text):
event_data['question'] = new_text

View file

@ -0,0 +1,104 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Images/question.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Question.gd" type="Script" id=2]
[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]
[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.243137, 0.231373, 0.396078, 0.772549 )
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="Question" type="HBoxContainer"]
margin_right = 1004.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 97.0
margin_bottom = 21.0
text = " Question "
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 101.0
margin_right = 301.0
margin_bottom = 28.0
rect_min_size = Vector2( 200, 0 )
expand_to_text_length = true
placeholder_text = "Write your promt here"
caret_blink = true
caret_blink_speed = 0.5
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 305.0
margin_top = 7.0
margin_right = 305.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 309.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="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,51 @@
tool
extends Control
var editor_reference
var editorPopup
var preview = "..."
onready var toggler = get_node("PanelContainer/VBoxContainer/Header/VisibleToggle")
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'background': ''
}
func _ready():
connect("gui_input", self, '_on_gui_input')
load_image(event_data['background'])
func _on_ImageButton_pressed():
editor_reference.godot_dialog("*.png, *.jpg, *.jpeg, *.tga, *.svg, *.svgz, *.bmp, *.webp;Image")
editor_reference.godot_dialog_connect(self, "_on_file_selected")
func _on_file_selected(path, target):
target.load_image(path)
func load_data(data):
event_data = data
load_image(event_data['background'])
func load_image(img_src):
event_data['background'] = img_src
if event_data['background'] != '':
$PanelContainer/VBoxContainer/HBoxContainer/LineEdit.text = event_data['background']
$PanelContainer/VBoxContainer/TextureRect.texture = load(event_data['background'])
$PanelContainer/VBoxContainer/TextureRect.rect_min_size = Vector2(200,200)
preview = event_data['background']
else:
$PanelContainer/VBoxContainer/TextureRect.rect_min_size = Vector2(0,0)
func _on_gui_input(event):
if event is InputEventMouseButton and event.is_pressed() and event.doubleclick:
if event.button_index == 1:
if toggler.pressed:
toggler.pressed = false
else:
toggler.pressed = true

View file

@ -0,0 +1,137 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/dialogic/Images/scene.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PieceExtraSettings.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/VisibleToggle.tscn" type="PackedScene" id=4]
[ext_resource path="res://addons/dialogic/Editor/Pieces/SceneEvent.gd" type="Script" id=5]
[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.219608, 0.34902, 0.701961, 0.443137 )
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="SceneBlock" type="HBoxContainer"]
anchor_right = 1.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 74.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1024.0
margin_bottom = 74.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 1018.0
margin_bottom = 68.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 1002.0
margin_bottom = 30.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 30.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 8.0
margin_right = 131.0
margin_bottom = 22.0
text = " Scene settings "
[node name="VisibleToggle" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 135.0
margin_right = 165.0
[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" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 169.0
margin_right = 961.0
margin_bottom = 30.0
mouse_filter = 1
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
margin_left = 965.0
margin_right = 1002.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="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_top = 34.0
margin_right = 1002.0
margin_bottom = 58.0
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 131.0
margin_bottom = 19.0
text = "Change background: "
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/HBoxContainer"]
margin_left = 135.0
margin_right = 435.0
margin_bottom = 24.0
rect_min_size = Vector2( 300, 0 )
caret_blink = true
caret_blink_speed = 0.5
[node name="ImageButton" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer"]
margin_left = 439.0
margin_right = 463.0
margin_bottom = 24.0
text = "..."
[node name="Control" type="Control" parent="PanelContainer/VBoxContainer/HBoxContainer"]
margin_left = 467.0
margin_right = 1002.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer"]
margin_top = 62.0
margin_right = 1002.0
margin_bottom = 62.0
size_flags_horizontal = 3
size_flags_vertical = 3
expand = true
stretch_mode = 5
[node name="DragController" parent="." instance=ExtResource( 3 )]
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/ImageButton" to="." method="_on_ImageButton_pressed"]

View file

@ -0,0 +1,43 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'set_theme': ''
}
func _ready():
$PanelContainer/VBoxContainer/Header/MenuButton.get_popup().connect(
"index_pressed", self, '_on_theme_selected')
func load_data(data):
event_data = data
if event_data['set_theme'] != '':
for theme in DialogicUtil.get_theme_list():
if theme['file'] == event_data['set_theme']:
$PanelContainer/VBoxContainer/Header/MenuButton.text = theme['name']
func _on_MenuButton_about_to_show():
var Dropdown = $PanelContainer/VBoxContainer/Header/MenuButton
var theme_list = DialogicUtil.get_theme_list()
var index = 0
Dropdown.get_popup().clear()
for theme in theme_list:
Dropdown.get_popup().add_item(theme['name'])
Dropdown.get_popup().set_item_metadata(index, {'file': theme['file']})
index += 1
func _on_theme_selected(index):
var text = $PanelContainer/VBoxContainer/Header/MenuButton.get_popup().get_item_text(index)
var metadata = $PanelContainer/VBoxContainer/Header/MenuButton.get_popup().get_item_metadata(index)
$PanelContainer/VBoxContainer/Header/MenuButton.text = text
event_data['set_theme'] = metadata['file']

View file

@ -0,0 +1,97 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/SetTheme.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Images/theme.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/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
[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.203922, 0.478431, 0.45098, 0.443137 )
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="SetTheme" 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_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1798.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 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 = 102.0
margin_bottom = 21.0
text = " Set Theme"
[node name="MenuButton" type="MenuButton" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 106.0
margin_right = 213.0
margin_bottom = 28.0
text = "[Select Theme]"
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 217.0
margin_top = 7.0
margin_right = 217.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 221.0
margin_right = 1735.0
margin_bottom = 28.0
size_flags_horizontal = 3
[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="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="about_to_show" from="PanelContainer/VBoxContainer/Header/MenuButton" to="." method="_on_MenuButton_about_to_show"]

View file

@ -0,0 +1,34 @@
tool
extends Control
var editor_reference
var editorPopup
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'set_value': '',
'definition': ''
}
onready var nodes = {
'definition_picker': $PanelContainer/VBoxContainer/Header/DefinitionPicker,
}
func _ready():
nodes['definition_picker'].get_popup().connect("index_pressed", self, '_on_definition_entry_selected')
func _on_definition_entry_selected(index):
var metadata = nodes['definition_picker'].get_popup().get_item_metadata(index)
event_data['definition'] = metadata['section']
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/LineEdit.text = event_data['set_value']
nodes['definition_picker'].load_definition(data['definition'])
func _on_LineEdit_text_changed(new_text):
event_data['set_value'] = new_text

View file

@ -0,0 +1,134 @@
[gd_scene load_steps=8 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/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]
[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.243137, 0.231373, 0.396078, 0.772549 )
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
[sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.745098, 0.745098, 0.745098, 1 )
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_left = 5.0
expand_margin_right = 5.0
[node name="SetValue" type="HBoxContainer"]
margin_right = 1004.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_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 2 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 133.0
margin_bottom = 21.0
text = " Set the value of"
[node name="DefinitionPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 6 )]
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="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 337.0
margin_right = 385.0
margin_bottom = 28.0
custom_styles/read_only = SubResource( 2 )
custom_styles/focus = SubResource( 2 )
custom_styles/normal = SubResource( 2 )
custom_colors/selection_color = Color( 0.345098, 0.345098, 0.345098, 1 )
custom_colors/cursor_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color_pressed = Color( 0, 0, 0, 1 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_colors/clear_button_color = Color( 0, 0, 0, 1 )
custom_colors/font_color_uneditable = Color( 0, 0, 0, 1 )
expand_to_text_length = true
caret_blink = true
caret_blink_speed = 0.5
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 389.0
margin_top = 7.0
margin_right = 389.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 393.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="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,100 @@
tool
extends Control
var text_height = 26
var editor_reference
var preview = ''
onready var toggler = get_node("PanelContainer/VBoxContainer/Header/VisibleToggle")
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'character': '',
'text': '',
'portrait': '',
}
onready var portrait_picker = $PanelContainer/VBoxContainer/Header/PortraitPicker
func _ready():
connect("gui_input", self, '_on_gui_input')
$PanelContainer/VBoxContainer/TextEdit.set("rect_min_size", Vector2(0, 80))
$PanelContainer/VBoxContainer/Header/CharacterPicker.connect('character_selected', self , '_on_character_selected')
portrait_picker.get_popup().connect("index_pressed", self, '_on_portrait_selected')
var c_list = DialogicUtil.get_character_list()
if c_list.size() == 0:
$PanelContainer/VBoxContainer/Header/CharacterPicker.visible = false
else:
# Default Speaker
for c in c_list:
if c['default_speaker']:
event_data['character'] = c['file']
func _on_character_selected(data):
event_data['character'] = data['file']
update_preview()
func _on_portrait_selected(index):
var text = portrait_picker.get_popup().get_item_text(index)
if text == "[Don't change]":
text = ''
portrait_picker.text = ''
event_data['portrait'] = text
update_preview()
func _on_TextEdit_text_changed():
var text = $PanelContainer/VBoxContainer/TextEdit.text
event_data['text'] = text
update_preview()
func load_text(text):
get_node("VBoxContainer/TextEdit").text = text
event_data['text'] = text
update_preview()
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/TextEdit.text = event_data['text']
update_preview()
func update_preview() -> String:
portrait_picker.set_character(event_data['character'], event_data['portrait'])
var t = $PanelContainer/VBoxContainer/TextEdit.text
$PanelContainer/VBoxContainer/TextEdit.rect_min_size.y = text_height * (2 + t.count('\n'))
for c in DialogicUtil.get_character_list():
if c['file'] == event_data['character']:
$PanelContainer/VBoxContainer/Header/CharacterPicker.set_data_by_file(event_data['character'])
var text = event_data['text']
var lines = text.count('\n')
if text == '':
return ''
if '\n' in text:
text = text.split('\n')[0]
preview = text
if preview.length() > 60:
preview = preview.left(60) + '...'
if lines > 0:
preview += ' - ' + str(lines + 1) + ' lines'
return preview
func _on_gui_input(event):
if event is InputEventMouseButton and event.is_pressed() and event.doubleclick:
if event.button_index == 1:
if toggler.pressed:
toggler.pressed = false
else:
toggler.pressed = true
func _on_saver_timer_timeout():
update_preview()

View file

@ -0,0 +1,135 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://addons/dialogic/Editor/Pieces/TextBlock.gd" type="Script" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/VisibleToggle.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/dialogic/Images/dialog.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/Editor/Pieces/Common/DragController.tscn" type="PackedScene" id=5]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/CharacterPicker.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/dialogic/Editor/Pieces/Common/PortraitPicker.tscn" type="PackedScene" id=7]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 6.0
content_margin_right = 6.0
content_margin_top = 6.0
content_margin_bottom = 6.0
bg_color = Color( 0.635294, 0.635294, 0.635294, 0.105882 )
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="TextBlock" type="HBoxContainer"]
anchor_right = 1.0
margin_bottom = 126.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_right = 25.0
margin_bottom = 126.0
rect_min_size = Vector2( 25, 0 )
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1024.0
margin_bottom = 126.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 6.0
margin_top = 6.0
margin_right = 1018.0
margin_bottom = 120.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 1012.0
margin_bottom = 30.0
[node name="Spacer1" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 5.0
margin_bottom = 30.0
rect_min_size = Vector2( 5, 0 )
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 9.0
margin_right = 31.0
margin_bottom = 30.0
texture = ExtResource( 3 )
stretch_mode = 6
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Header"]
visible = false
margin_left = 60.0
margin_top = 8.0
margin_right = 103.0
margin_bottom = 22.0
text = " Text "
[node name="VSeparator" type="VSeparator" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 35.0
margin_right = 39.0
margin_bottom = 30.0
[node name="CharacterPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 6 )]
margin_left = 43.0
margin_right = 149.0
[node name="PortraitPicker" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 7 )]
visible = false
[node name="VisibleToggle" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 2 )]
margin_left = 153.0
margin_right = 183.0
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
visible = false
margin_left = 234.0
margin_top = 8.0
margin_right = 246.0
margin_bottom = 22.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
text = "..."
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 187.0
margin_right = 971.0
margin_bottom = 30.0
mouse_filter = 1
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 975.0
margin_right = 1012.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="TextEdit" type="TextEdit" parent="PanelContainer/VBoxContainer"]
margin_top = 34.0
margin_right = 1012.0
margin_bottom = 114.0
rect_min_size = Vector2( 0, 80 )
size_flags_horizontal = 3
size_flags_vertical = 3
show_line_numbers = true
smooth_scrolling = true
wrap_enabled = true
[node name="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="text_changed" from="PanelContainer/VBoxContainer/TextEdit" to="." method="_on_TextEdit_text_changed"]

View file

@ -0,0 +1,18 @@
tool
extends Control
var editor_reference
# This is the information of this event and it will get parsed and saved to the JSON file.
var event_data = {
'wait_seconds': 0
}
func load_data(data):
event_data = data
$PanelContainer/VBoxContainer/Header/SpinBox.value = event_data['wait_seconds']
func _on_SpinBox_value_changed(value):
event_data['wait_seconds'] = value

View file

@ -0,0 +1,110 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://addons/dialogic/Images/Wait.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Editor/Pieces/WaitSeconds.gd" type="Script" id=2]
[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]
[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.435294, 0.301961, 0.603922, 0.192157 )
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="WaitSeconds" type="HBoxContainer"]
margin_right = 1004.0
margin_bottom = 42.0
size_flags_horizontal = 3
size_flags_vertical = 9
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Indent" type="Control" parent="."]
visible = false
margin_bottom = 42.0
[node name="PanelContainer" type="PanelContainer" parent="."]
margin_right = 1004.0
margin_bottom = 42.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/panel = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
margin_left = 16.0
margin_top = 6.0
margin_right = 998.0
margin_bottom = 36.0
size_flags_horizontal = 3
[node name="Header" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
margin_right = 982.0
margin_bottom = 28.0
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/Header"]
margin_right = 22.0
margin_bottom = 28.0
texture = ExtResource( 1 )
stretch_mode = 6
[node name="Title" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 26.0
margin_top = 7.0
margin_right = 75.0
margin_bottom = 21.0
text = " Wait "
[node name="SpinBox" type="SpinBox" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 79.0
margin_right = 153.0
margin_bottom = 28.0
min_value = 0.1
value = 0.1
allow_greater = true
align = 1
[node name="Title2" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 157.0
margin_top = 7.0
margin_right = 218.0
margin_bottom = 21.0
text = " Seconds"
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 222.0
margin_top = 7.0
margin_right = 222.0
margin_bottom = 21.0
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
[node name="Spacer" type="Control" parent="PanelContainer/VBoxContainer/Header"]
margin_left = 226.0
margin_right = 941.0
margin_bottom = 28.0
size_flags_horizontal = 3
[node name="OptionButton" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 4 )]
margin_left = 945.0
margin_right = 982.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="DragController" parent="." instance=ExtResource( 5 )]
[connection signal="value_changed" from="PanelContainer/VBoxContainer/Header/SpinBox" to="." method="_on_SpinBox_value_changed"]

View file

@ -0,0 +1,79 @@
tool
extends ScrollContainer
onready var nodes = {
'themes': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer/ThemeOptionButton,
'new_lines': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer2/NewLines,
'remove_empty_messages': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer/RemoveEmptyMessages,
'auto_color_names': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer3/AutoColorNames,
}
func _ready():
update_data()
nodes['themes'].connect('item_selected', self, '_on_default_theme_selected')
nodes['new_lines'].connect('toggled', self, '_on_new_line_toggled')
nodes['remove_empty_messages'].connect('toggled', self, '_on_remove_empty_message_toggled')
nodes['auto_color_names'].connect('toggled', self, '_on_auto_color_names_toggled')
func update_data():
var settings = DialogicUtil.get_settings()
refresh_themes(settings)
dialog_options(settings)
func dialog_options(settings):
if settings.has_section_key('dialog', 'remove_empty_messages'):
nodes['remove_empty_messages'].pressed = settings.get_value('dialog', 'remove_empty_messages')
if settings.has_section_key('dialog', 'new_lines'):
nodes['new_lines'].pressed = settings.get_value('dialog', 'new_lines')
func refresh_themes(settings):
nodes['themes'].clear()
var theme_list = DialogicUtil.get_theme_list()
var theme_indexes = {}
var index = 0
for theme in theme_list:
nodes['themes'].add_item(theme['name'])
nodes['themes'].set_item_metadata(index, {'file': theme['file']})
theme_indexes[theme['file']] = index
index += 1
# Only one item added, then save as default
if index == 1:
set_value('theme', 'default', theme_list[0]['file'])
# More than one theme? Select which the default one is
if index > 1:
if settings.has_section_key('theme', 'default'):
nodes['themes'].select(theme_indexes[settings.get_value('theme', 'default', null)])
else:
# Fallback
set_value('theme', 'default', theme_list[0]['file'])
func _on_default_theme_selected(index):
set_value('theme', 'default', nodes['themes'].get_item_metadata(index)['file'])
func _on_remove_empty_message_toggled(value):
set_value('dialog', 'remove_empty_messages', value)
func _on_new_line_toggled(value):
set_value('dialog', 'new_lines', value)
func _on_auto_color_names_toggled(value):
set_value('dialog', 'auto_color_names', value)
# Reading and saving data to the settings file
func set_value(section, key, value):
var config = ConfigFile.new()
var file = DialogicUtil.get_path('SETTINGS_FILE')
var err = config.load(file)
if err == OK:
config.set_value(section, key, value)
config.save(file)

View file

@ -0,0 +1,143 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/dialogic/Editor/SettingsEditor/SettingsEditor.gd" type="Script" id=1]
[node name="SettingsEditor" type="ScrollContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
margin_right = 1024.0
margin_bottom = 184.0
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3"]
margin_right = 288.0
margin_bottom = 184.0
custom_constants/separation = 16
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer"]
margin_right = 288.0
margin_bottom = 54.0
[node name="Panel" type="Panel" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer"]
margin_right = 288.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
size_flags_horizontal = 3
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/Panel"]
margin_right = 40.0
margin_bottom = 14.0
text = "Theme"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer"]
margin_top = 34.0
margin_right = 288.0
margin_bottom = 54.0
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer"]
margin_top = 3.0
margin_right = 46.0
margin_bottom = 17.0
text = "Default"
[node name="ThemeOptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 50.0
margin_right = 190.0
margin_bottom = 20.0
rect_min_size = Vector2( 140, 0 )
text = "Default"
items = [ "Default", null, false, 0, {
"file": "theme-1614997416.cfg"
}, "Alternative", null, false, 1, {
"file": "theme-1614997426.cfg"
}, "Small", null, false, 2, {
"file": "theme-1615080820.cfg"
} ]
selected = 0
[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer"]
margin_top = 70.0
margin_right = 288.0
margin_bottom = 184.0
[node name="Panel2" type="Panel" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
margin_right = 288.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
size_flags_horizontal = 3
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/Panel2"]
margin_right = 40.0
margin_bottom = 14.0
text = "Dialog"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
margin_top = 34.0
margin_right = 288.0
margin_bottom = 58.0
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer2"]
margin_top = 5.0
margin_right = 237.0
margin_bottom = 19.0
text = "New lines will create extra messages"
[node name="NewLines" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer2"]
margin_left = 241.0
margin_right = 265.0
margin_bottom = 24.0
hint_tooltip = "If enabled, every new line will be displayed
as a separated message."
pressed = true
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
margin_top = 62.0
margin_right = 288.0
margin_bottom = 86.0
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer"]
margin_top = 5.0
margin_right = 165.0
margin_bottom = 19.0
text = "Remove empty messages"
[node name="RemoveEmptyMessages" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer"]
margin_left = 169.0
margin_right = 288.0
margin_bottom = 24.0
size_flags_horizontal = 3
pressed = true
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
margin_top = 90.0
margin_right = 288.0
margin_bottom = 114.0
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer3"]
margin_top = 5.0
margin_right = 260.0
margin_bottom = 19.0
text = "Auto color character names in messages"
[node name="AutoColorNames" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer3"]
margin_left = 264.0
margin_right = 288.0
margin_bottom = 24.0
pressed = true

View file

@ -0,0 +1,319 @@
tool
extends Control
var editor_reference
onready var master_tree = get_node('../MasterTree')
onready var settings_editor = get_node('../SettingsEditor')
var current_theme = ''
# The amazing and revolutionary path system that magically works and you can't
# complain because "that is not how you are supposed to work". If there was only
# a way to set an id and then access that node via id...
# Here you have paths in all its glory. Praise the paths (っ´ω`c)♡
onready var n = {
# Text
'theme_text_shadow': $VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2/CheckBoxShadow,
'theme_text_shadow_color': $VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2/ColorPickerButtonShadow,
'theme_text_color': $VBoxContainer/HBoxContainer2/Text/GridContainer/ColorPickerButton,
'theme_font': $VBoxContainer/HBoxContainer2/Text/GridContainer/FontButton,
'theme_shadow_offset_x': $VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer/ShadowOffsetX,
'theme_shadow_offset_y': $VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer/ShadowOffsetY,
'theme_text_speed': $VBoxContainer/HBoxContainer2/Text/GridContainer/TextSpeed,
'alignment': $VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer3/Alignment,
# Dialog box
'background_texture_button_visible': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3/CheckBox,
'theme_background_image': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3/BackgroundTextureButton,
'theme_next_image': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/NextIndicatorButton,
'theme_action_key': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/BoxContainer/ActionOptionButton,
'theme_background_color_visible': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/CheckBox,
'theme_background_color': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2/ColorPickerButton,
'theme_text_margin': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer/TextOffsetV,
'theme_text_margin_h': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer/TextOffsetH,
'size_w': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4/BoxSizeW,
'size_h': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4/BoxSizeH,
'bottom_gap': $VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer5/BottomGap,
# Buttons
'button_text_color_enabled': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4/CheckBox2,
'button_text_color': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4/ButtonTextColor,
'button_background': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2/ColorPickerButton,
'button_background_visible': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2/CheckBox,
'button_image': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3/BackgroundTextureButton,
'button_image_visible': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3/CheckBox,
'button_offset_x': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetH,
'button_offset_y': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer/TextOffsetV,
'button_separation': $VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/VerticalSeparation,
# Definitions
'glossary_font': $VBoxContainer/HBoxContainer2/Glossary/GridContainer/FontButton,
'glossary_color': $VBoxContainer/HBoxContainer2/Glossary/GridContainer/ColorPickerButton,
# Text preview
'preview_panel': $VBoxContainer/Panel,
'text_preview': $VBoxContainer/HBoxContainer3/TextEdit,
}
func _ready():
# Signal connection to free up some memory
connect("visibility_changed", self, "_on_visibility_changed")
# Force preview update
_on_visibility_changed()
func load_theme(filename):
current_theme = filename
var theme = DialogicUtil.get_theme(filename)
# Settings
n['theme_action_key'].text = theme.get_value('settings', 'action_key', 'ui_accept')
# Background
n['theme_background_image'].text = DialogicUtil.get_filename_from_path(theme.get_value('background', 'image', 'res://addons/dialogic/Images/background/background-2.png'))
n['background_texture_button_visible'].pressed = theme.get_value('background', 'use_image', true)
n['theme_background_color'].color = Color(theme.get_value('background', 'color', '#ff000000'))
n['theme_background_color_visible'].pressed = theme.get_value('background', 'use_color', false)
n['theme_next_image'].text = DialogicUtil.get_filename_from_path(theme.get_value('next_indicator', 'image', 'res://addons/dialogic/Images/next-indicator.png'))
var size_value = theme.get_value('box', 'size', Vector2(910, 167))
n['size_w'].value = size_value.x
n['size_h'].value = size_value.y
n['bottom_gap'].value = theme.get_value('box', 'bottom_gap', 40)
# Buttons
n['button_text_color_enabled'].pressed = theme.get_value('buttons', 'text_color_enabled', true)
n['button_text_color'].color = Color(theme.get_value('buttons', 'text_color', "#ffffffff"))
n['button_background'].color = Color(theme.get_value('buttons', 'background_color', "#ff000000"))
n['button_background_visible'].pressed = theme.get_value('buttons', 'use_background_color', false)
n['button_image'].text = DialogicUtil.get_filename_from_path(theme.get_value('buttons', 'image', 'res://addons/dialogic/Images/background/background-2.png'))
n['button_image_visible'].pressed = theme.get_value('buttons', 'use_image', true)
n['button_offset_x'].value = theme.get_value('buttons', 'padding', Vector2(5,5)).x
n['button_offset_y'].value = theme.get_value('buttons', 'padding', Vector2(5,5)).y
n['button_separation'].value = theme.get_value('buttons', 'gap', 5)
# Definitions
n['glossary_color'].color = Color(theme.get_value('definitions', 'color', "#ffffffff"))
n['glossary_font'].text = DialogicUtil.get_filename_from_path(theme.get_value('definitions', 'font', "res://addons/dialogic/Fonts/GlossaryFont.tres"))
# Text
n['theme_text_speed'].value = theme.get_value('text','speed', 2)
n['theme_font'].text = DialogicUtil.get_filename_from_path(theme.get_value('text', 'font', 'res://addons/dialogic/Fonts/DefaultFont.tres'))
n['theme_text_color'].color = Color(theme.get_value('text', 'color', '#ffffffff'))
n['theme_text_shadow'].pressed = theme.get_value('text', 'shadow', false)
n['theme_text_shadow_color'].color = Color(theme.get_value('text', 'shadow_color', '#9e000000'))
n['theme_shadow_offset_x'].value = theme.get_value('text', 'shadow_offset', Vector2(2,2)).x
n['theme_shadow_offset_y'].value = theme.get_value('text', 'shadow_offset', Vector2(2,2)).y
n['theme_text_margin'].value = theme.get_value('text', 'margin', Vector2(20, 10)).x
n['theme_text_margin_h'].value = theme.get_value('text', 'margin', Vector2(20, 10)).y
n['alignment'].text = theme.get_value('text', 'alignment', 'Left')
match n['alignment'].text:
'Left':
n['alignment'].select(0)
'Center':
n['alignment'].select(1)
'Right':
n['alignment'].select(2)
func new_theme():
var theme_file = 'theme-' + str(OS.get_unix_time()) + '.cfg'
DialogicUtil.create_empty_file(DialogicUtil.get_path('THEME_DIR', theme_file))
master_tree.add_theme({'file': theme_file, 'name': theme_file})
load_theme(theme_file)
# Check if it is the only theme to set as default
if DialogicUtil.get_theme_list().size() == 1:
print('only theme, setting as default')
settings_editor.set_value('theme', 'default', theme_file)
func _on_BackgroundTextureButton_pressed():
editor_reference.godot_dialog("*.png")
editor_reference.godot_dialog_connect(self, "_on_background_selected")
func _on_background_selected(path, target):
DialogicUtil.set_theme_value(current_theme, 'background','image', path)
n['theme_background_image'].text = DialogicUtil.get_filename_from_path(path)
func _on_NextIndicatorButton_pressed():
editor_reference.godot_dialog("*.png")
editor_reference.godot_dialog_connect(self, "_on_indicator_selected")
func _on_indicator_selected(path, target):
DialogicUtil.set_theme_value(current_theme, 'next_indicator','image', path)
n['theme_next_image'].text = DialogicUtil.get_filename_from_path(path)
func _on_ColorPickerButton_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'text','color', '#' + color.to_html())
func _on_ColorPickerButtonShadow_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'text','shadow_color', '#' + color.to_html())
func _on_CheckBoxShadow_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'text','shadow', button_pressed)
func _on_ShadowOffset_value_changed(_value):
DialogicUtil.set_theme_value(current_theme, 'text','shadow_offset', Vector2(n['theme_shadow_offset_x'].value,n['theme_shadow_offset_y'].value))
func _on_PreviewButton_pressed():
for i in n['preview_panel'].get_children():
i.free()
var dialogic_node = load("res://addons/dialogic/Dialog.tscn")
var preview_dialog = dialogic_node.instance()
preview_dialog.preview = true
preview_dialog.get_node('DefinitionInfo').in_theme_editor = true
preview_dialog.get_node('TextBubble/NextIndicator/AnimationPlayer').play('IDLE')
preview_dialog.dialog_script['events'] = [{
"character":"",
"portrait":"",
"text": n['text_preview'].text
}]
# Settings
preview_dialog.settings = DialogicUtil.get_settings()
# Alignment
preview_dialog.dialog_script = preview_dialog.parse_definitions(preview_dialog.dialog_script)
preview_dialog.dialog_script = preview_dialog.parse_text_lines(preview_dialog.dialog_script)
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.current_theme = preview_dialog.load_theme(current_theme)
preview_dialog.load_dialog()
# 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 = Vector2(0,0)
func _on_ActionOptionButton_item_selected(index):
DialogicUtil.set_theme_value(current_theme, 'settings','action_key', n['theme_action_key'].text)
func _on_ActionOptionButton_pressed():
n['theme_action_key'].clear()
n['theme_action_key'].add_item('[Select Action]')
InputMap.load_from_globals()
for a in InputMap.get_actions():
n['theme_action_key'].add_item(a)
func _on_FontButton_pressed():
editor_reference.godot_dialog("*.tres")
editor_reference.godot_dialog_connect(self, "_on_Font_selected")
func _on_Font_selected(path, target):
DialogicUtil.set_theme_value(current_theme, 'text','font', path)
n['theme_font'].text = DialogicUtil.get_filename_from_path(path)
func _on_textSpeed_value_changed(value):
DialogicUtil.set_theme_value(current_theme, 'text','speed', value)
func _on_TextMargin_value_changed(value):
var final_vector = Vector2(
n['theme_text_margin'].value,
n['theme_text_margin_h'].value
)
DialogicUtil.set_theme_value(current_theme, 'text', 'margin', final_vector)
func _on_BackgroundColor_CheckBox_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'background', 'use_color', button_pressed)
func _on_BackgroundColor_ColorPickerButton_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'background', 'color', '#' + color.to_html())
func _on_BackgroundTexture_CheckBox_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'background', 'use_image', button_pressed)
func _on_button_background_visible_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'use_background_color', button_pressed)
func _on_button_background_color_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'background_color', '#' + color.to_html())
func _on_ButtonOffset_value_changed(value):
var final_vector = Vector2(
n['button_offset_x'].value,
n['button_offset_y'].value
)
DialogicUtil.set_theme_value(current_theme, 'buttons', 'padding', final_vector)
func _on_VerticalSeparation_value_changed(value):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'gap', n['button_separation'].value)
func _on_button_texture_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'use_image', button_pressed)
func _on_ButtonTextureButton_pressed():
editor_reference.godot_dialog("*.png")
editor_reference.godot_dialog_connect(self, "_on_button_texture_selected")
func _on_button_texture_selected(path, target):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'image', path)
n['button_image'].text = DialogicUtil.get_filename_from_path(path)
func _on_ButtonTextColor_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'text_color', '#' + color.to_html())
func _on_Custom_Button_Color_toggled(button_pressed):
DialogicUtil.set_theme_value(current_theme, 'buttons', 'text_color_enabled', button_pressed)
func _on_GlossaryColorPicker_color_changed(color):
DialogicUtil.set_theme_value(current_theme, 'definitions', 'color', '#' + color.to_html())
func _on_GlossaryFontButton_pressed():
editor_reference.godot_dialog("*.tres")
editor_reference.godot_dialog_connect(self, "_on_Glossary_Font_selected")
func _on_Glossary_Font_selected(path, target):
DialogicUtil.set_theme_value(current_theme, 'definitions', 'font', path)
n['glossary_font'].text = DialogicUtil.get_filename_from_path(path)
func _on_visibility_changed():
if visible:
# Refreshing the dialog
_on_PreviewButton_pressed()
else:
# Erasing all previews since them keeps working
# on background
for i in n['preview_panel'].get_children():
i.queue_free()
func _on_BoxSize_value_changed(value):
var size_value = Vector2(n['size_w'].value, n['size_h'].value)
DialogicUtil.set_theme_value(current_theme, 'box', 'size', size_value)
func _on_BottomGap_value_changed(value):
DialogicUtil.set_theme_value(current_theme, 'box', 'bottom_gap', value)
func _on_Alignment_item_selected(index):
if index == 0:
DialogicUtil.set_theme_value(current_theme, 'text', 'alignment', 'Left')
elif index == 1:
DialogicUtil.set_theme_value(current_theme, 'text', 'alignment', 'Center')
elif index == 2:
DialogicUtil.set_theme_value(current_theme, 'text', 'alignment', 'Right')

View file

@ -0,0 +1,696 @@
[gd_scene load_steps=3 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]
[node name="ThemeEditor" type="ScrollContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_right = 1048.0
margin_bottom = 623.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
[node name="Text" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_right = 316.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/Text"]
margin_right = 316.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Text/PanelContainer"]
margin_right = 40.0
margin_bottom = 14.0
text = "Text"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/Text"]
margin_top = 34.0
margin_right = 316.0
margin_bottom = 202.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_top = 3.0
margin_right = 148.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Font"
[node name="FontButton" type="Button" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_right = 316.0
margin_bottom = 20.0
size_flags_vertical = 4
text = "DefaultFont"
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_top = 32.0
margin_right = 148.0
margin_bottom = 46.0
text = "Color"
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_top = 24.0
margin_right = 316.0
margin_bottom = 54.0
rect_min_size = Vector2( 50, 30 )
color = Color( 1, 1, 1, 1 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_top = 66.0
margin_right = 148.0
margin_bottom = 80.0
text = "Shadow"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_top = 58.0
margin_right = 316.0
margin_bottom = 88.0
[node name="CheckBoxShadow" type="CheckBox" parent="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 30.0
[node name="ColorPickerButtonShadow" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2"]
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/Text/GridContainer"]
margin_top = 97.0
margin_right = 148.0
margin_bottom = 111.0
text = "Shadow Offset"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_top = 92.0
margin_right = 316.0
margin_bottom = 116.0
custom_constants/separation = 10
[node name="ShadowOffsetX" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Text/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/Text/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="Label6" type="Label" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_top = 125.0
margin_right = 148.0
margin_bottom = 139.0
text = "Speed (bigger = slower)"
[node name="TextSpeed" type="SpinBox" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_top = 120.0
margin_right = 316.0
margin_bottom = 144.0
max_value = 10.0
value = 2.0
rounded = true
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_top = 151.0
margin_right = 148.0
margin_bottom = 165.0
text = "Alignment"
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/Text/GridContainer"]
margin_left = 158.0
margin_top = 148.0
margin_right = 316.0
margin_bottom = 168.0
[node name="Alignment" type="OptionButton" parent="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer3"]
margin_right = 158.0
margin_bottom = 20.0
size_flags_horizontal = 3
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"]
margin_left = 320.0
margin_right = 614.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/DialogBox"]
margin_right = 294.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/PanelContainer"]
margin_right = 40.0
margin_bottom = 14.0
text = "Dialog Box"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/DialogBox"]
margin_top = 34.0
margin_right = 294.0
margin_bottom = 218.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 5.0
margin_right = 132.0
margin_bottom = 19.0
text = "Background Color"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_right = 294.0
margin_bottom = 24.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 24.0
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer2"]
margin_left = 28.0
margin_right = 152.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 33.0
margin_right = 132.0
margin_bottom = 47.0
text = "Background Texture"
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 28.0
margin_right = 294.0
margin_bottom = 52.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3"]
margin_right = 24.0
margin_bottom = 24.0
pressed = true
[node name="BackgroundTextureButton" type="Button" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3"]
margin_left = 28.0
margin_right = 152.0
margin_bottom = 24.0
size_flags_horizontal = 3
text = "background-2"
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 59.0
margin_right = 132.0
margin_bottom = 73.0
text = "Next dialog indicator"
[node name="NextIndicatorButton" type="Button" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 56.0
margin_right = 294.0
margin_bottom = 76.0
text = "next-indicator"
[node name="Label6" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 85.0
margin_right = 132.0
margin_bottom = 99.0
text = "Box padding"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 80.0
margin_right = 294.0
margin_bottom = 104.0
[node name="TextOffsetV" type="SpinBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer"]
margin_right = 74.0
margin_bottom = 24.0
value = 10.0
rounded = true
allow_lesser = true
[node name="TextOffsetH" type="SpinBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer"]
margin_left = 78.0
margin_right = 152.0
margin_bottom = 24.0
value = 20.0
rounded = true
allow_lesser = true
[node name="Label7" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 113.0
margin_right = 132.0
margin_bottom = 127.0
text = "Box Size (pixels)"
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 108.0
margin_right = 294.0
margin_bottom = 132.0
[node name="BoxSizeW" type="SpinBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4"]
margin_right = 74.0
margin_bottom = 24.0
value = 100.0
rounded = true
allow_greater = true
allow_lesser = true
[node name="BoxSizeH" type="SpinBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4"]
margin_left = 78.0
margin_right = 152.0
margin_bottom = 24.0
max_value = 999.0
value = 167.0
rounded = true
allow_greater = true
allow_lesser = true
[node name="Label8" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 141.0
margin_right = 132.0
margin_bottom = 155.0
text = "Bottom gap"
[node name="HBoxContainer5" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 136.0
margin_right = 294.0
margin_bottom = 160.0
[node name="BottomGap" type="SpinBox" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer5"]
margin_right = 74.0
margin_bottom = 24.0
max_value = 999.0
value = 40.0
rounded = true
allow_greater = true
allow_lesser = true
[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_top = 164.0
margin_right = 132.0
margin_bottom = 184.0
size_flags_vertical = 5
text = "Action key"
[node name="BoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer"]
margin_left = 142.0
margin_top = 164.0
margin_right = 294.0
margin_bottom = 184.0
[node name="ActionOptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/BoxContainer"]
margin_right = 152.0
margin_bottom = 20.0
hint_tooltip = "To add/remove actions go to Project > Project Settings > Input Map"
size_flags_horizontal = 3
text = "[Select Action]"
items = [ "[Select Action]", null, false, 0, null, "ui_accept", null, false, 1, null, "ui_select", null, false, 2, null, "ui_cancel", null, false, 3, null, "ui_focus_next", null, false, 4, null, "ui_focus_prev", null, false, 5, null, "ui_left", null, false, 6, null, "ui_right", null, false, 7, null, "ui_up", null, false, 8, null, "ui_down", null, false, 9, null, "ui_page_up", null, false, 10, null, "ui_page_down", null, false, 11, null, "ui_home", null, false, 12, null, "ui_end", null, false, 13, null ]
selected = 0
[node name="ButtonStyle" type="VBoxContainer" parent="VBoxContainer/HBoxContainer2"]
margin_left = 618.0
margin_right = 906.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/ButtonStyle"]
margin_right = 288.0
margin_bottom = 30.0
rect_min_size = Vector2( 0, 30 )
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/PanelContainer"]
margin_right = 40.0
margin_bottom = 14.0
text = "Choice Buttons"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle"]
margin_top = 34.0
margin_right = 288.0
margin_bottom = 170.0
size_flags_horizontal = 3
custom_constants/hseparation = 10
columns = 2
[node name="Label5" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_top = 5.0
margin_right = 126.0
margin_bottom = 19.0
text = "Text Color "
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_left = 136.0
margin_right = 288.0
margin_bottom = 24.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CheckBox2" type="CheckBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4"]
margin_right = 24.0
margin_bottom = 24.0
pressed = true
[node name="ButtonTextColor" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4"]
margin_left = 28.0
margin_right = 152.0
margin_bottom = 24.0
size_flags_horizontal = 3
color = Color( 1, 1, 1, 1 )
[node name="Label7" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_top = 33.0
margin_right = 126.0
margin_bottom = 47.0
text = "Background Color"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_left = 136.0
margin_top = 28.0
margin_right = 288.0
margin_bottom = 52.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2"]
margin_right = 24.0
margin_bottom = 24.0
[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2"]
margin_left = 28.0
margin_right = 152.0
margin_bottom = 24.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_top = 61.0
margin_right = 126.0
margin_bottom = 75.0
text = "Background Texture"
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_left = 136.0
margin_top = 56.0
margin_right = 288.0
margin_bottom = 80.0
[node name="CheckBox" type="CheckBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3"]
margin_right = 24.0
margin_bottom = 24.0
pressed = true
[node name="BackgroundTextureButton" type="Button" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3"]
margin_left = 28.0
margin_right = 152.0
margin_bottom = 24.0
size_flags_horizontal = 3
text = "background-2"
[node name="Label6" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_top = 89.0
margin_right = 126.0
margin_bottom = 103.0
text = "Box padding"
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_left = 136.0
margin_top = 84.0
margin_right = 288.0
margin_bottom = 108.0
[node name="TextOffsetV" type="SpinBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer"]
margin_right = 74.0
margin_bottom = 24.0
value = 5.0
rounded = true
allow_lesser = true
prefix = "V"
[node name="TextOffsetH" type="SpinBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer"]
margin_left = 78.0
margin_right = 152.0
margin_bottom = 24.0
value = 5.0
rounded = true
allow_lesser = true
prefix = "H"
[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_top = 117.0
margin_right = 126.0
margin_bottom = 131.0
text = "Vertical separation"
[node name="VerticalSeparation" type="SpinBox" parent="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer"]
margin_left = 136.0
margin_top = 112.0
margin_right = 288.0
margin_bottom = 136.0
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
custom_constants/separation = 10
[node name="TextEdit" type="TextEdit" parent="VBoxContainer/HBoxContainer3"]
margin_right = 886.0
margin_bottom = 60.0
rect_min_size = Vector2( 400, 60 )
size_flags_horizontal = 3
text = "This is preview text. You can use [color=#A5EFAC]BBCode[/color] to style it.
[wave amp=50 freq=2]You can even use effects![/wave]"
wrap_enabled = true
[node name="PreviewButton" type="Button" parent="VBoxContainer/HBoxContainer3"]
margin_left = 896.0
margin_right = 1048.0
margin_bottom = 60.0
text = " Preview changes "
icon = ExtResource( 1 )
[node name="Panel" type="Panel" parent="VBoxContainer"]
margin_top = 308.0
margin_right = 1048.0
margin_bottom = 608.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
[node name="Control" type="Control" parent="VBoxContainer/HBoxContainer"]
margin_right = 1048.0
size_flags_horizontal = 3
size_flags_vertical = 3
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/FontButton" to="." method="_on_FontButton_pressed"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/ColorPickerButton" to="." method="_on_ColorPickerButton_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2/CheckBoxShadow" to="." method="_on_CheckBoxShadow_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer2/ColorPickerButtonShadow" to="." method="_on_ColorPickerButtonShadow_color_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/Text/GridContainer/HBoxContainer/ShadowOffsetX" to="." method="_on_ShadowOffset_value_changed"]
[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/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"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer3/BackgroundTextureButton" to="." method="_on_BackgroundTextureButton_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/NextIndicatorButton" to="." method="_on_NextIndicatorButton_pressed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer/TextOffsetV" to="." method="_on_TextMargin_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer/TextOffsetH" to="." method="_on_TextMargin_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4/BoxSizeW" to="." method="_on_BoxSize_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer4/BoxSizeH" to="." method="_on_BoxSize_value_changed"]
[connection signal="value_changed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/HBoxContainer5/BottomGap" to="." method="_on_BottomGap_value_changed"]
[connection signal="item_selected" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/BoxContainer/ActionOptionButton" to="." method="_on_ActionOptionButton_item_selected"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/DialogBox/GridContainer/BoxContainer/ActionOptionButton" to="." method="_on_ActionOptionButton_pressed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4/CheckBox2" to="." method="_on_Custom_Button_Color_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer4/ButtonTextColor" to="." method="_on_ButtonTextColor_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2/CheckBox" to="." method="_on_button_background_visible_toggled"]
[connection signal="color_changed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer2/ColorPickerButton" to="." method="_on_button_background_color_color_changed"]
[connection signal="toggled" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3/CheckBox" to="." method="_on_button_texture_toggled"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/ButtonStyle/GridContainer/HBoxContainer3/BackgroundTextureButton" to="." method="_on_ButtonTextureButton_pressed"]
[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"]

View file

@ -0,0 +1,11 @@
[box]
size=Vector2( 910, 167 )
[text]
margin=Vector2( 20, 10 )
[settings]
name="Dialogic"

View file

@ -0,0 +1,245 @@
tool
extends HSplitContainer
var editor_reference
var timeline_name
var working_timeline_file: String = ''
var current_timeline: Dictionary = {}
onready var master_tree = get_node('../MasterTree')
onready var timeline = $TimelineArea/TimeLine
onready var events_warning = $ScrollContainer/EventContainer/EventsWarning
func _ready():
# We connect all the event buttons to the event creation functions
for b in $ScrollContainer/EventContainer.get_children():
if b is Button:
if b.name == 'ButtonQuestion':
b.connect('pressed', self, "_on_ButtonQuestion_pressed", [])
elif b.name == 'IfCondition':
b.connect('pressed', self, "_on_ButtonCondition_pressed", [])
else:
b.connect('pressed', self, "_create_event_button_pressed", [b.name])
# Event Creation signal for buttons
func _create_event_button_pressed(button_name):
create_event(button_name)
indent_events()
func _on_ButtonQuestion_pressed() -> void:
create_event("Question", {'no-data': true}, true)
create_event("Choice", {'no-data': true}, true)
create_event("Choice", {'no-data': true}, true)
create_event("EndBranch", {'no-data': true}, true)
func _on_ButtonCondition_pressed() -> void:
create_event("IfCondition", {'no-data': true}, true)
create_event("EndBranch", {'no-data': true}, true)
# Adding an event to the timeline
func create_event(scene: String, data: Dictionary = {'no-data': true} , indent: bool = false):
# This function will create an event in the timeline.
var piece = load("res://addons/dialogic/Editor/Pieces/" + scene + ".tscn").instance()
piece.editor_reference = editor_reference
timeline.add_child(piece)
if data.has('no-data') == false:
piece.load_data(data)
events_warning.visible = false
# Indent on create
if indent:
indent_events()
return piece
# Event Indenting
func indent_events() -> void:
var indent: int = 0
var starter: bool = false
var event_list: Array = timeline.get_children()
var question_index: int = 0
var question_indent = {}
if event_list.size() < 2:
return
# Resetting all the indents
for event in event_list:
var indent_node = event.get_node("Indent")
indent_node.visible = false
# Adding new indents
for event in event_list:
if event.event_data.has('question') or event.event_data.has('condition'):
indent += 1
starter = true
question_index += 1
question_indent[question_index] = indent
if event.event_data.has('choice'):
if question_index > 0:
indent = question_indent[question_index] + 1
starter = true
if event.event_data.has('endbranch'):
if question_indent.has(question_index):
indent = question_indent[question_index]
indent -= 1
question_index -= 1
if indent < 0:
indent = 0
if indent > 0:
var indent_node = event.get_node("Indent")
indent_node.rect_min_size = Vector2(25 * indent, 0)
indent_node.visible = true
if starter:
indent_node.rect_min_size = Vector2(25 * (indent - 1), 0)
if indent - 1 == 0:
indent_node.visible = false
starter = false
func load_timeline(path):
print('---------------------------')
print('Loading: ',path)
clear_timeline()
var start_time = OS.get_system_time_msecs()
working_timeline_file = path
var data = DialogicUtil.load_json(path)
if data['metadata'].has('name'):
timeline_name = data['metadata']['name']
else:
timeline_name = data['metadata']['file']
data = data['events']
for i in data:
match i:
{'text', 'character', 'portrait'}:
create_event("TextBlock", i)
{'background'}:
create_event("SceneEvent", i)
{'character', 'action', 'position', 'portrait'}:
create_event("CharacterJoinBlock", i)
{'audio', 'file'}:
create_event("AudioBlock", i)
{'question', 'options'}:
create_event("Question", i)
{'choice'}:
create_event("Choice", i)
{'endbranch'}:
create_event("EndBranch", i)
{'character', 'action'}:
create_event("CharacterLeaveBlock", i)
{'change_timeline'}:
create_event("ChangeTimeline", i)
{'emit_signal'}:
create_event("EmitSignal", i)
{'change_scene'}:
create_event("ChangeScene", i)
{'close_dialog'}:
create_event("CloseDialog", i)
{'wait_seconds'}:
create_event("WaitSeconds", i)
{'condition', 'definition', 'value'}:
create_event("IfCondition", i)
{'set_value', 'definition'}:
create_event("SetValue", i)
{'set_theme'}:
create_event("SetTheme", i)
if data.size() < 1:
events_warning.visible = true
else:
events_warning.visible = false
indent_events()
#fold_all_nodes()
var elapsed_time = (OS.get_system_time_msecs() - start_time) * 0.001
editor_reference.dprint("Loading time: " + str(elapsed_time))
func clear_timeline():
for event in timeline.get_children():
event.free()
# ordering blocks in timeline
func move_block(block, direction):
var block_index = block.get_index()
if direction == 'up':
if block_index > 0:
timeline.move_child(block, block_index - 1)
return true
if direction == 'down':
timeline.move_child(block, block_index + 1)
return true
return false
# Create timeline
func create_timeline():
var timeline_file = 'timeline-' + str(OS.get_unix_time()) + '.json'
var timeline = {
"events": [],
"metadata":{
"dialogic-version": editor_reference.version_string,
"file": timeline_file
}
}
var directory = Directory.new()
if not directory.dir_exists(DialogicUtil.get_path('WORKING_DIR')):
directory.make_dir(DialogicUtil.get_path('WORKING_DIR'))
if not directory.dir_exists(DialogicUtil.get_path('TIMELINE_DIR')):
directory.make_dir(DialogicUtil.get_path('TIMELINE_DIR'))
var file = File.new()
file.open(DialogicUtil.get_path('TIMELINE_DIR') + '/' + timeline_file, File.WRITE)
file.store_line(to_json(timeline))
file.close()
return timeline
func new_timeline():
# This event creates and selects the new timeline
master_tree.add_timeline(create_timeline()['metadata'], true)
# Saving
func generate_save_data():
var t_name = timeline_name
var f_name = DialogicUtil.get_filename_from_path(working_timeline_file)
if t_name == '':
timeline_name = f_name
var info_to_save = {
'metadata': {
'dialogic-version': editor_reference.version_string,
'name': t_name,
'file': f_name
},
'events': []
}
for event in timeline.get_children():
if event.is_queued_for_deletion() == false: # Checking that the event is not waiting to be removed
info_to_save['events'].append(event.event_data)
return info_to_save
func save_timeline() -> void:
if working_timeline_file != '':
var info_to_save = generate_save_data()
var file = File.new()
file.open(working_timeline_file, File.WRITE)
file.store_line(to_json(info_to_save))
file.close()
#print('[+] Saving: ' , working_timeline_file)
# Utilities
func fold_all_nodes():
for event in timeline.get_children():
event.get_node("PanelContainer/VBoxContainer/Header/VisibleToggle").set_pressed(false)
func unfold_all_nodes():
for event in timeline.get_children():
event.get_node("PanelContainer/VBoxContainer/Header/VisibleToggle").set_pressed(true)

View file

@ -0,0 +1,333 @@
[gd_scene load_steps=21 format=2]
[ext_resource path="res://addons/dialogic/Images/character-join.svg" type="Texture" id=1]
[ext_resource path="res://addons/dialogic/Images/dialog.svg" type="Texture" id=2]
[ext_resource path="res://addons/dialogic/Images/audio-event.svg" type="Texture" id=3]
[ext_resource path="res://addons/dialogic/Images/scene.svg" type="Texture" id=4]
[ext_resource path="res://addons/dialogic/Images/condition.svg" type="Texture" id=5]
[ext_resource path="res://addons/dialogic/Images/end-dialog.svg" type="Texture" id=6]
[ext_resource path="res://addons/dialogic/Images/character-leave.svg" type="Texture" id=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/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]
[ext_resource path="res://addons/dialogic/Images/change-scene.svg" type="Texture" id=15]
[ext_resource path="res://addons/dialogic/Images/signal.svg" type="Texture" id=16]
[ext_resource path="res://addons/dialogic/Editor/TimelineEditor/TimelineEditor.gd" type="Script" id=17]
[ext_resource path="res://addons/dialogic/Images/theme.svg" type="Texture" id=18]
[sub_resource type="StyleBoxFlat" id=1]
content_margin_left = 5.0
content_margin_right = 5.0
content_margin_top = 5.0
content_margin_bottom = 5.0
bg_color = Color( 0.14902, 0.172549, 0.231373, 1 )
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color( 0.0980392, 0.113725, 0.152941, 1 )
[sub_resource type="StyleBoxFlat" id=2]
content_margin_right = 6.0
content_margin_top = 10.0
content_margin_bottom = 10.0
bg_color = Color( 0.94902, 1, 0.482353, 1 )
corner_radius_top_left = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="TimelineEditor" type="HSplitContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 0
split_offset = 7
script = ExtResource( 17 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TimelineArea" type="ScrollContainer" parent="."]
margin_right = 826.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_styles/bg = SubResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TimeLine" type="VBoxContainer" parent="TimelineArea"]
margin_left = 5.0
margin_top = 5.0
margin_right = 821.0
margin_bottom = 595.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="ScrollContainer" type="ScrollContainer" parent="."]
margin_left = 834.0
margin_right = 1024.0
margin_bottom = 600.0
rect_min_size = Vector2( 190, 0 )
[node name="EventContainer" type="VBoxContainer" parent="ScrollContainer"]
margin_right = 178.0
margin_bottom = 664.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="EventsWarning" type="PanelContainer" parent="ScrollContainer/EventContainer"]
margin_right = 178.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_bottom = 58.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/EventContainer/EventsWarning/HBoxContainer"]
margin_right = 40.0
margin_bottom = 48.0
rect_min_size = Vector2( 40, 40 )
texture = ExtResource( 13 )
stretch_mode = 4
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/EventsWarning/HBoxContainer"]
margin_left = 44.0
margin_right = 172.0
margin_bottom = 48.0
rect_min_size = Vector2( 100, 0 )
size_flags_horizontal = 3
size_flags_vertical = 1
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = "Add an event to start building your timeline"
autowrap = true
[node name="HBoxContainer6" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 72.0
margin_right = 178.0
margin_bottom = 86.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer6"]
margin_right = 77.0
margin_bottom = 14.0
text = "Main Events"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer6"]
margin_left = 81.0
margin_right = 178.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_bottom = 118.0
text = " Text Event"
icon = ExtResource( 2 )
align = 0
[node name="CharacterJoinBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 122.0
margin_right = 178.0
margin_bottom = 150.0
text = " Character Join"
icon = ExtResource( 1 )
align = 0
[node name="CharacterLeaveBlock" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 154.0
margin_right = 178.0
margin_bottom = 182.0
text = " Character Leave"
icon = ExtResource( 7 )
align = 0
[node name="HBoxContainer5" type="HBoxContainer" parent="ScrollContainer/EventContainer"]
margin_top = 186.0
margin_right = 178.0
margin_bottom = 200.0
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer5"]
margin_right = 33.0
margin_bottom = 14.0
text = "Logic"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer5"]
margin_left = 37.0
margin_right = 178.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_bottom = 232.0
text = " Question"
icon = ExtResource( 8 )
align = 0
[node name="Choice" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 236.0
margin_right = 178.0
margin_bottom = 264.0
text = " Choice"
icon = ExtResource( 12 )
align = 0
[node name="IfCondition" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 268.0
margin_right = 178.0
margin_bottom = 296.0
text = " Condition"
icon = ExtResource( 5 )
align = 0
[node name="EndBranch" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 300.0
margin_right = 178.0
margin_bottom = 328.0
text = " End Branch"
icon = ExtResource( 9 )
align = 0
[node name="SetValue" type="Button" parent="ScrollContainer/EventContainer"]
margin_top = 332.0
margin_right = 178.0
margin_bottom = 354.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
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer3"]
margin_right = 56.0
margin_bottom = 14.0
text = "Timeline"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer3"]
margin_left = 60.0
margin_right = 178.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
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
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
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
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
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
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer4"]
margin_right = 37.0
margin_bottom = 14.0
text = "Audio"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer4"]
margin_left = 41.0
margin_right = 178.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
text = " Audio Event"
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
[node name="Label" type="Label" parent="ScrollContainer/EventContainer/HBoxContainer"]
margin_right = 39.0
margin_bottom = 14.0
text = "Godot"
[node name="HSeparator2" type="HSeparator" parent="ScrollContainer/EventContainer/HBoxContainer"]
margin_left = 43.0
margin_right = 178.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
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
hint_tooltip = "This will instantly change
the current scene."
text = " Change Scene"
icon = ExtResource( 15 )
align = 0

View file

@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[sub_resource type="DynamicFontData" id=1]
font_path = "res://addons/dialogic/Fonts/Overlock/Overlock-Black.ttf"
[resource]
size = 30
font_data = SubResource( 1 )

View file

@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[sub_resource type="DynamicFontData" id=1]
font_path = "res://addons/dialogic/Fonts/Overlock/Overlock-Black.ttf"
[resource]
size = 20
font_data = SubResource( 1 )

View file

@ -0,0 +1,94 @@
Copyright (c) 2011, Dario Manuel Muhafara (http://www.tipo.net.ar),
with Reserved Font Names "Overlock" "Overlock SC"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://Fonts/Overlock/Overlock-Black.ttf" type="DynamicFontData" id=1]
[resource]
size = 30
font_data = ExtResource( 1 )

View file

@ -0,0 +1 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 1c-.554 0-1 .446-1 1v9c0 .554.446 1 1 1h1v-9h9v-1c0-.554-.446-1-1-1zm3 3c-.554 0-1 .446-1 1v9c0 .554.446 1 1 1h9c.554 0 1-.446 1-1v-9c0-.554-.446-1-1-1zm1 2h7v7h-7z" fill="#e0e0e0"/></svg>

After

Width:  |  Height:  |  Size: 283 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/ActionCopy.svg-63402671dac0d39077ea78c09fc673aa.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/ActionCopy.svg"
dest_files=[ "res://.import/ActionCopy.svg-63402671dac0d39077ea78c09fc673aa.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 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 1v6h-6v2h6v6h2v-6h6v-2h-6v-6z" fill="#e0e0e0"/></svg>

After

Width:  |  Height:  |  Size: 148 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Add.svg-841b9d99eb0e55333201a7ce23318272.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Add.svg"
dest_files=[ "res://.import/Add.svg-841b9d99eb0e55333201a7ce23318272.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="M5 4H17V18H5V4ZM7 6H15V8H7V6ZM15 10H7V12H15V10ZM7 14H15V16H7V14Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 233 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/set-value.svg-a9ffb569c3bc80942d1fddebebfaa118.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Events/set-value.svg"
dest_files=[ "res://.import/set-value.svg-a9ffb569c3bc80942d1fddebebfaa118.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 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v5h2v8h1 5v1h6v-3h-6v1h-5v-4h5v1h6v-3h-6v1h-5v-2h3v-4h-2l-1-1z" fill="#e0e0e0"/></svg>

After

Width:  |  Height:  |  Size: 183 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Filesystem.svg-a3ca74f9d2cdc62927955e2f99c73ac1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Filesystem.svg"
dest_files=[ "res://.import/Filesystem.svg-a3ca74f9d2cdc62927955e2f99c73ac1.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 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m2 2a1 1 0 0 0 -1 1v2 6 2a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7a1 1 0 0 0 -1-1h-4a1 1 0 0 1 -1-1v-1a1 1 0 0 0 -1-1z" fill="#e0e0e0"/></svg>

After

Width:  |  Height:  |  Size: 227 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Folder.svg-7c3a7f8f27acdb56a6bac36cd9971e63.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Folder.svg"
dest_files=[ "res://.import/Folder.svg-7c3a7f8f27acdb56a6bac36cd9971e63.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 @@
<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>

After

Width:  |  Height:  |  Size: 437 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/ListSelect.svg"
dest_files=[ "res://.import/ListSelect.svg-13f1ed55ed7b218cc38ee6eb54d49a49.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="M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18ZM6.64645 10.0607C7.00543 9.70168 7.49232 9.5 8 9.5C8.50768 9.5 8.99457 9.70168 9.35355 10.0607L9.64645 10.3536L10.3536 9.64645L10.0607 9.35355C9.51414 8.80703 8.7729 8.5 8 8.5C7.2271 8.5 6.48586 8.80703 5.93934 9.35355L5.64645 9.64645L6.35355 10.3536L6.64645 10.0607ZM14 9.5C13.4923 9.5 13.0054 9.70168 12.6464 10.0607L12.3536 10.3536L11.6464 9.64645L11.9393 9.35355C12.4859 8.80703 13.2271 8.5 14 8.5C14.7729 8.5 15.5141 8.80703 16.0607 9.35355L16.3536 9.64645L15.6464 10.3536L15.3536 10.0607C14.9946 9.70168 14.5077 9.5 14 9.5ZM11 16C9 16 7.5 14 7 13H15C14.5 14 13 16 11 16Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 854 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Portrait.svg-d630deb987a3ece30f0222a720e96235.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Portrait.svg"
dest_files=[ "res://.import/Portrait.svg-d630deb987a3ece30f0222a720e96235.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 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 1v1h-4v2h14v-2h-4v-1zm-3 4v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8zm1 2h2v6h-2zm4 0h2v6h-2zm4 0h2v6h-2z" fill="#e0e0e0" fill-opacity=".99608"/></svg>

After

Width:  |  Height:  |  Size: 239 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Remove.svg-5fdf7012a90fe887e73fc55cb69bdaf2.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Remove.svg"
dest_files=[ "res://.import/Remove.svg-5fdf7012a90fe887e73fc55cb69bdaf2.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 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 2v2h2v8h-2v2h2c.55228 0 1-.4477 1-1 0 .5523.44772 1 1 1h2v-2h-2v-8h2v-2h-2c-.55228 0-1 .44772-1 1 0-.55228-.44772-1-1-1z" fill="#e0e0e0"/></svg>

After

Width:  |  Height:  |  Size: 240 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Rename.svg-508928498e7f6f3e2fb62b2c606d9f7e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Rename.svg"
dest_files=[ "res://.import/Rename.svg-508928498e7f6f3e2fb62b2c606d9f7e.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,4 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.07142 3V4.21429C8.74937 4.21429 8.44052 4.34222 8.21279 4.56994C7.98507 4.79766 7.85714 5.10652 7.85714 5.42857V17.5714H6.64285V15.1429H4.21428V17.5714C4.21445 17.7844 4.27064 17.9936 4.3772 18.178C4.48377 18.3624 4.63697 18.5156 4.82142 18.6221C5.00592 18.729 5.21533 18.7854 5.42856 18.7857V20H13.9286C14.5727 20 15.1904 19.7441 15.6458 19.2887C16.1013 18.8332 16.3571 18.2155 16.3571 17.5714V7.85714H20V5.42857C20 4.78447 19.7441 4.16676 19.2887 3.71131C18.8332 3.25587 18.2155 3 17.5714 3H9.07142Z" fill="white"/>
<path d="M9.07143 3C7.73013 3 6.64286 4.08731 6.64286 5.42857V13.9286H4.21429H3V15.1429V17.5714C3 18.9127 4.08731 20 5.42857 20C6.76984 20 7.85714 18.9127 7.85714 17.5714V5.42857C7.85714 4.75795 8.4008 4.21429 9.07143 4.21429C9.74205 4.21429 10.2857 4.75795 10.2857 5.42857V6.64286V7.85714V9.07143H11.5H16.3571V7.85714H11.5V6.64286V5.42857C11.5 4.08727 10.4127 3 9.07143 3ZM4.21429 15.1429H6.64286V17.5714C6.64286 18.2421 6.0992 18.7857 5.42857 18.7857C4.75795 18.7857 4.21429 18.2421 4.21429 17.5714V15.1429Z" fill="#B4B4B4"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Script.svg-a11888b5cecb4b416a71982e0e80279a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Script.svg"
dest_files=[ "res://.import/Script.svg-a11888b5cecb4b416a71982e0e80279a.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,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="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"/>
</svg>

After

Width:  |  Height:  |  Size: 579 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/add-character.svg-24c4802c30d4441d70c317a53eb83e45.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Toolbar/add-character.svg"
dest_files=[ "res://.import/add-character.svg-24c4802c30d4441d70c317a53eb83e45.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,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"/>
</svg>

After

Width:  |  Height:  |  Size: 298 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/add-definition.svg-6c717aad0d8623c9b81b21cb29fd99b6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Images/Toolbar/add-definition.svg"
dest_files=[ "res://.import/add-definition.svg-6c717aad0d8623c9b81b21cb29fd99b6.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,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="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.9 KiB

Some files were not shown because too many files have changed in this diff Show more