update dialogic
This commit is contained in:
parent
ddbc27f283
commit
f5a2768ef0
11 changed files with 234 additions and 216 deletions
14
addons/dialogic/Editor/Common/SectionTitle.tscn
Normal file
14
addons/dialogic/Editor/Common/SectionTitle.tscn
Normal file
|
@ -0,0 +1,14 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
content_margin_left = 4.0
|
||||
content_margin_right = 4.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color( 0, 0, 0, 1 )
|
||||
|
||||
[node name="SectionTitle" type="Label"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Visuals"
|
|
@ -5,9 +5,6 @@
|
|||
[ext_resource path="res://addons/dialogic/Editor/Events/Common/Spacer.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://addons/dialogic/Editor/Events/Common/PieceExtraSettings.tscn" type="PackedScene" id=4]
|
||||
|
||||
|
||||
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
content_margin_left = 16.0
|
||||
content_margin_right = 6.0
|
||||
|
@ -82,9 +79,19 @@ margin_right = 124.0
|
|||
margin_bottom = 21.0
|
||||
text = " Emit Signal "
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Header"]
|
||||
margin_left = 128.0
|
||||
margin_right = 176.0
|
||||
margin_top = 7.0
|
||||
margin_right = 472.0
|
||||
margin_bottom = 21.0
|
||||
text = "Emit the dialogic_signal with the following argument: "
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="PanelContainer/VBoxContainer/Header"]
|
||||
margin_left = 476.0
|
||||
margin_right = 524.0
|
||||
margin_bottom = 28.0
|
||||
custom_styles/read_only = SubResource( 2 )
|
||||
custom_styles/focus = SubResource( 2 )
|
||||
|
@ -101,14 +108,14 @@ caret_blink = true
|
|||
caret_blink_speed = 0.5
|
||||
|
||||
[node name="Preview" type="Label" parent="PanelContainer/VBoxContainer/Header"]
|
||||
margin_left = 180.0
|
||||
margin_left = 528.0
|
||||
margin_top = 7.0
|
||||
margin_right = 180.0
|
||||
margin_right = 528.0
|
||||
margin_bottom = 21.0
|
||||
custom_colors/font_color = Color( 1, 1, 1, 0.513726 )
|
||||
|
||||
[node name="Spacer" parent="PanelContainer/VBoxContainer/Header" instance=ExtResource( 3 )]
|
||||
margin_left = 184.0
|
||||
margin_left = 532.0
|
||||
margin_right = 941.0
|
||||
margin_bottom = 28.0
|
||||
|
||||
|
@ -117,4 +124,5 @@ 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 ]
|
||||
|
||||
[connection signal="text_changed" from="PanelContainer/VBoxContainer/Header/LineEdit" to="." method="_on_LineEdit_text_changed"]
|
||||
|
|
|
@ -3,49 +3,70 @@ extends ScrollContainer
|
|||
|
||||
onready var nodes = {
|
||||
'themes': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer/ThemeOptionButton,
|
||||
'advanced_themes': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer2/AdvancedThemes,
|
||||
'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,
|
||||
'propagate_input': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer4/PropagateInput,
|
||||
'dim_characters': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer5/DimCharacters,
|
||||
'advanced_themes': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer6/AdvancedThemes,
|
||||
'save_current_timeline': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer/SaveCurrentTimeline,
|
||||
'clear_current_timeline': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer2/ClearCurrentTimeline,
|
||||
'save_definitions_on_start': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer3/SaveDefinitionsOnStart,
|
||||
'save_definitions_on_end': $VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer4/SaveDefinitionsOnEnd,
|
||||
}
|
||||
|
||||
var THEME_KEYS := [
|
||||
'advanced_themes',
|
||||
]
|
||||
|
||||
var DIALOG_KEYS := [
|
||||
'new_lines',
|
||||
'remove_empty_messages',
|
||||
'auto_color_names',
|
||||
'propagate_input',
|
||||
'dim_characters',
|
||||
]
|
||||
|
||||
var SAVING_KEYS := [
|
||||
'save_current_timeline',
|
||||
'clear_current_timeline',
|
||||
'save_definitions_on_start',
|
||||
'save_definitions_on_end',
|
||||
]
|
||||
|
||||
func _ready():
|
||||
update_data()
|
||||
|
||||
# Themes
|
||||
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')
|
||||
nodes['propagate_input'].connect('toggled', self, '_on_propagate_input_toggled')
|
||||
nodes['dim_characters'].connect('toggled', self, '_on_dim_characters_toggled')
|
||||
nodes['advanced_themes'].connect('toggled', self, '_on_advanced_themes_toggled')
|
||||
# TODO move to theme section later
|
||||
nodes['advanced_themes'].connect('toggled', self, '_on_item_toggled', ['dialog', 'advanced_themes'])
|
||||
|
||||
for k in DIALOG_KEYS:
|
||||
nodes[k].connect('toggled', self, '_on_item_toggled', ['dialog', k])
|
||||
|
||||
for k in SAVING_KEYS:
|
||||
nodes[k].connect('toggled', self, '_on_item_toggled', ['saving', k])
|
||||
|
||||
|
||||
func update_data():
|
||||
var settings = DialogicResources.get_settings_config()
|
||||
refresh_themes(settings)
|
||||
dialog_options(settings)
|
||||
load_values(settings, "dialog")
|
||||
load_values(settings, "saving")
|
||||
|
||||
|
||||
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')
|
||||
if settings.has_section_key('dialog', 'auto_color_names'):
|
||||
nodes['auto_color_names'].pressed = settings.get_value('dialog', 'auto_color_names')
|
||||
if settings.has_section_key('dialog', 'propagate_input'):
|
||||
nodes['propagate_input'].pressed = settings.get_value('dialog', 'propagate_input')
|
||||
if settings.has_section_key('dialog', 'dim_characters'):
|
||||
nodes['dim_characters'].pressed = settings.get_value('dialog', 'dim_characters')
|
||||
func load_values(settings: ConfigFile, section: String):
|
||||
for k in DIALOG_KEYS:
|
||||
if settings.has_section_key(section, k):
|
||||
nodes[k].pressed = settings.get_value(section, k)
|
||||
|
||||
|
||||
func refresh_themes(settings: ConfigFile):
|
||||
# TODO move to theme section later
|
||||
if settings.has_section_key('dialog', 'advanced_themes'):
|
||||
nodes['advanced_themes'].pressed = settings.get_value('dialog', 'advanced_themes')
|
||||
|
||||
|
||||
func refresh_themes(settings):
|
||||
nodes['themes'].clear()
|
||||
var theme_list = DialogicUtil.get_sorted_theme_list()
|
||||
var theme_indexes = {}
|
||||
|
@ -73,28 +94,8 @@ 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)
|
||||
|
||||
|
||||
func _on_propagate_input_toggled(value):
|
||||
set_value('dialog', 'propagate_input', value)
|
||||
|
||||
|
||||
func _on_dim_characters_toggled(value):
|
||||
set_value('dialog', 'dim_characters', value)
|
||||
|
||||
|
||||
func _on_advanced_themes_toggled(value):
|
||||
set_value('dialog', 'advanced_themes', value)
|
||||
func _on_item_toggled(value: bool, section: String, key: String):
|
||||
set_value(section, key, value)
|
||||
|
||||
|
||||
# Reading and saving data to the settings file
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Editor/SettingsEditor/SettingsEditor.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/dialogic/Editor/Common/SectionTitle.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="SettingsEditor" type="ScrollContainer"]
|
||||
anchor_right = 1.0
|
||||
|
@ -18,35 +19,25 @@ size_flags_vertical = 3
|
|||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 268.0
|
||||
margin_bottom = 402.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3"]
|
||||
margin_right = 304.0
|
||||
margin_bottom = 268.0
|
||||
margin_bottom = 402.0
|
||||
custom_constants/separation = 16
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||
margin_right = 304.0
|
||||
margin_bottom = 54.0
|
||||
margin_bottom = 74.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer" instance=ExtResource( 2 )]
|
||||
margin_right = 304.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_top = 26.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 54.0
|
||||
margin_bottom = 46.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
margin_top = 3.0
|
||||
|
@ -67,29 +58,37 @@ items = [ "no_gloss", null, false, 0, {
|
|||
} ]
|
||||
selected = 1
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer"]
|
||||
margin_top = 50.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 74.0
|
||||
hint_tooltip = "These options can lead to unexpected behaviors. Make sure to read the documentation before using these."
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer2"]
|
||||
margin_top = 5.0
|
||||
margin_right = 160.0
|
||||
margin_bottom = 19.0
|
||||
text = "Advanced theme options"
|
||||
|
||||
[node name="AdvancedThemes" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 164.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 24.0
|
||||
pressed = true
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||
margin_top = 70.0
|
||||
margin_top = 90.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 268.0
|
||||
margin_bottom = 252.0
|
||||
|
||||
[node name="Panel2" type="Panel" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2" instance=ExtResource( 2 )]
|
||||
margin_right = 304.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_top = 26.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 58.0
|
||||
margin_bottom = 50.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer2"]
|
||||
margin_top = 5.0
|
||||
|
@ -106,9 +105,9 @@ as a separated message."
|
|||
pressed = true
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
margin_top = 62.0
|
||||
margin_top = 54.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 86.0
|
||||
margin_bottom = 78.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer"]
|
||||
margin_top = 5.0
|
||||
|
@ -124,9 +123,9 @@ size_flags_horizontal = 3
|
|||
pressed = true
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
margin_top = 90.0
|
||||
margin_top = 82.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 114.0
|
||||
margin_bottom = 106.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer3"]
|
||||
margin_top = 5.0
|
||||
|
@ -141,9 +140,9 @@ margin_bottom = 24.0
|
|||
pressed = true
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
margin_top = 118.0
|
||||
margin_top = 110.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 142.0
|
||||
margin_bottom = 134.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer4"]
|
||||
margin_top = 5.0
|
||||
|
@ -158,9 +157,9 @@ margin_bottom = 24.0
|
|||
pressed = true
|
||||
|
||||
[node name="HBoxContainer5" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
margin_top = 146.0
|
||||
margin_top = 138.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 170.0
|
||||
margin_bottom = 162.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer5"]
|
||||
margin_top = 5.0
|
||||
|
@ -174,19 +173,84 @@ margin_right = 304.0
|
|||
margin_bottom = 24.0
|
||||
pressed = true
|
||||
|
||||
[node name="HBoxContainer6" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2"]
|
||||
margin_top = 174.0
|
||||
[node name="VBoxContainer3" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer"]
|
||||
margin_top = 268.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 198.0
|
||||
hint_tooltip = "These options can lead to unexpected behaviors. Make sure to read the documentation before using these."
|
||||
margin_bottom = 402.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer6"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3" instance=ExtResource( 2 )]
|
||||
margin_right = 304.0
|
||||
text = "Saving"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3"]
|
||||
margin_top = 26.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 50.0
|
||||
hint_tooltip = "The saved timeline can then be used to automatically start the dialog back to the last timeline"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer"]
|
||||
margin_top = 5.0
|
||||
margin_right = 160.0
|
||||
margin_right = 248.0
|
||||
margin_bottom = 19.0
|
||||
text = "Advanced theme options"
|
||||
text = "Save current timeline on timeline start"
|
||||
|
||||
[node name="AdvancedThemes" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer2/HBoxContainer6"]
|
||||
margin_left = 164.0
|
||||
margin_right = 188.0
|
||||
[node name="SaveCurrentTimeline" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer"]
|
||||
margin_left = 252.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 24.0
|
||||
size_flags_horizontal = 3
|
||||
pressed = true
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3"]
|
||||
margin_top = 54.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 78.0
|
||||
hint_tooltip = "Clearing the saved timeline can help automatically restarting the game when the timeline end is reached"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer2"]
|
||||
margin_top = 5.0
|
||||
margin_right = 237.0
|
||||
margin_bottom = 19.0
|
||||
text = "Clear saved timeline on timeline end"
|
||||
|
||||
[node name="ClearCurrentTimeline" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer2"]
|
||||
margin_left = 241.0
|
||||
margin_right = 265.0
|
||||
margin_bottom = 24.0
|
||||
pressed = true
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3"]
|
||||
margin_top = 82.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 106.0
|
||||
hint_tooltip = "Saving definitions and timeline start helps maintaining a coherent save state when jumping from timeline to timeline"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer3"]
|
||||
margin_top = 5.0
|
||||
margin_right = 212.0
|
||||
margin_bottom = 19.0
|
||||
text = "Save definitions on timeline start"
|
||||
|
||||
[node name="SaveDefinitionsOnStart" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer3"]
|
||||
margin_left = 216.0
|
||||
margin_right = 240.0
|
||||
margin_bottom = 24.0
|
||||
pressed = true
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3"]
|
||||
margin_top = 110.0
|
||||
margin_right = 304.0
|
||||
margin_bottom = 134.0
|
||||
hint_tooltip = "Saving definitions on timeline end makes sure everything is saved when your dialog ends"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer4"]
|
||||
margin_top = 5.0
|
||||
margin_right = 207.0
|
||||
margin_bottom = 19.0
|
||||
text = "Save definitions on timeline end"
|
||||
|
||||
[node name="SaveDefinitionsOnEnd" type="CheckBox" parent="VBoxContainer/HBoxContainer3/VBoxContainer/VBoxContainer3/HBoxContainer4"]
|
||||
margin_left = 211.0
|
||||
margin_right = 235.0
|
||||
margin_bottom = 24.0
|
||||
pressed = true
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
tool
|
||||
extends Panel
|
||||
|
||||
|
||||
func _ready():
|
||||
$HBoxContainer/Label.text = name
|
|
@ -1,35 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/SectionTitle.gd" type="Script" id=1]
|
||||
|
||||
[node name="PanelContainer" type="Panel"]
|
||||
margin_right = 138.0
|
||||
margin_bottom = 30.0
|
||||
rect_min_size = Vector2( 0, 30 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer"]
|
||||
margin_top = 8.0
|
||||
margin_right = 138.0
|
||||
margin_bottom = 22.0
|
||||
size_flags_horizontal = 3
|
||||
text = "PanelContainer"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CheckBox" type="CheckBox" parent="HBoxContainer"]
|
||||
visible = false
|
||||
margin_left = 114.0
|
||||
margin_right = 138.0
|
||||
margin_bottom = 30.0
|
|
@ -2,13 +2,7 @@
|
|||
|
||||
[ext_resource path="res://addons/dialogic/Images/Plugin/plugin-editor-icon-light-theme.svg" type="Texture" id=1]
|
||||
[ext_resource path="res://addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
content_margin_left = 4.0
|
||||
content_margin_right = 4.0
|
||||
content_margin_top = 4.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color( 0.2652, 0.2784, 0.3114, 1 )
|
||||
[ext_resource path="res://addons/dialogic/Editor/Common/SectionTitle.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="ThemeEditor" type="ScrollContainer"]
|
||||
anchor_right = 1.0
|
||||
|
@ -81,11 +75,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Dialog Text/Column"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Visuals"
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Dialog Text/Column" instance=ExtResource( 3 )]
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Dialog Text/Column"]
|
||||
margin_top = 26.0
|
||||
|
@ -212,10 +202,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Dialog Text/Column2"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Dialog Text/Column2" instance=ExtResource( 3 )]
|
||||
text = "Behavior"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Dialog Text/Column2"]
|
||||
|
@ -253,18 +240,15 @@ custom_constants/separation = 10
|
|||
|
||||
[node name="Column" type="VBoxContainer" parent="VBoxContainer/TabContainer/Dialog Box"]
|
||||
margin_right = 288.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Dialog Box/Column"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Dialog Box/Column" instance=ExtResource( 3 )]
|
||||
margin_right = 288.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Visuals"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Dialog Box/Column"]
|
||||
margin_top = 26.0
|
||||
|
@ -428,22 +412,19 @@ allow_lesser = true
|
|||
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/TabContainer/Dialog Box"]
|
||||
margin_left = 298.0
|
||||
margin_right = 302.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
|
||||
[node name="Column2" type="VBoxContainer" parent="VBoxContainer/TabContainer/Dialog Box"]
|
||||
margin_left = 312.0
|
||||
margin_right = 582.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Dialog Box/Column2"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Dialog Box/Column2" instance=ExtResource( 3 )]
|
||||
text = "Next Indicator"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Dialog Box/Column2"]
|
||||
|
@ -537,22 +518,19 @@ allow_lesser = true
|
|||
[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/TabContainer/Dialog Box"]
|
||||
margin_left = 592.0
|
||||
margin_right = 596.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
|
||||
[node name="Column3" type="VBoxContainer" parent="VBoxContainer/TabContainer/Dialog Box"]
|
||||
margin_left = 606.0
|
||||
margin_right = 876.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Dialog Box/Column3"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Dialog Box/Column3" instance=ExtResource( 3 )]
|
||||
text = "Behavior"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Dialog Box/Column3"]
|
||||
|
@ -596,17 +574,15 @@ custom_constants/separation = 10
|
|||
|
||||
[node name="Column" type="VBoxContainer" parent="VBoxContainer/TabContainer/Name Label"]
|
||||
margin_right = 287.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Name Label/Column"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Name Label/Column" instance=ExtResource( 3 )]
|
||||
margin_right = 287.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Text"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Name Label/Column"]
|
||||
|
@ -684,22 +660,19 @@ prefix = "Y"
|
|||
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/TabContainer/Name Label"]
|
||||
margin_left = 297.0
|
||||
margin_right = 301.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
|
||||
[node name="Column2" type="VBoxContainer" parent="VBoxContainer/TabContainer/Name Label"]
|
||||
margin_left = 311.0
|
||||
margin_right = 581.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Name Label/Column2"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Name Label/Column2" instance=ExtResource( 3 )]
|
||||
text = "Box"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Name Label/Column2"]
|
||||
|
@ -779,22 +752,19 @@ size_flags_horizontal = 3
|
|||
[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/TabContainer/Name Label"]
|
||||
margin_left = 591.0
|
||||
margin_right = 595.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
|
||||
[node name="Column3" type="VBoxContainer" parent="VBoxContainer/TabContainer/Name Label"]
|
||||
margin_left = 605.0
|
||||
margin_right = 875.0
|
||||
margin_bottom = 325.0
|
||||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Name Label/Column3"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Name Label/Column3" instance=ExtResource( 3 )]
|
||||
text = "Placement"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Name Label/Column3"]
|
||||
|
@ -824,6 +794,7 @@ allow_greater = true
|
|||
allow_lesser = true
|
||||
|
||||
[node name="Choice Buttons" type="HBoxContainer" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 4.0
|
||||
|
@ -841,11 +812,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Choice Buttons/Column"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Visuals"
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Choice Buttons/Column" instance=ExtResource( 3 )]
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Choice Buttons/Column"]
|
||||
margin_top = 26.0
|
||||
|
@ -994,10 +961,8 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Choice Buttons/Column2"]
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Choice Buttons/Column2" instance=ExtResource( 3 )]
|
||||
margin_right = 309.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Placement"
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Choice Buttons/Column2"]
|
||||
|
@ -1099,10 +1064,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Choice Buttons/Column3"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Choice Buttons/Column3" instance=ExtResource( 3 )]
|
||||
text = "Advanced"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Choice Buttons/Column3"]
|
||||
|
@ -1148,7 +1110,6 @@ size_flags_horizontal = 3
|
|||
text = "custom"
|
||||
|
||||
[node name="Glossary" type="HBoxContainer" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 4.0
|
||||
|
@ -1162,11 +1123,7 @@ margin_right = 270.0
|
|||
margin_bottom = 488.0
|
||||
rect_min_size = Vector2( 270, 0 )
|
||||
|
||||
[node name="SectionTitle" type="Label" parent="VBoxContainer/TabContainer/Glossary/Column"]
|
||||
margin_right = 270.0
|
||||
margin_bottom = 22.0
|
||||
custom_styles/normal = SubResource( 1 )
|
||||
text = "Visuals"
|
||||
[node name="SectionTitle" parent="VBoxContainer/TabContainer/Glossary/Column" instance=ExtResource( 3 )]
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/TabContainer/Glossary/Column"]
|
||||
margin_top = 26.0
|
||||
|
|
|
@ -352,7 +352,9 @@ func _on_text_completed():
|
|||
|
||||
func on_timeline_start():
|
||||
if not Engine.is_editor_hint():
|
||||
if settings.get_value('saving', 'save_definitions_on_start', true):
|
||||
DialogicSingleton.save_definitions()
|
||||
if settings.get_value('saving', 'save_current_timeline', true):
|
||||
DialogicSingleton.set_current_timeline(current_timeline)
|
||||
# TODO remove event_start in 2.0
|
||||
emit_signal("event_start", "timeline", current_timeline)
|
||||
|
@ -361,7 +363,9 @@ func on_timeline_start():
|
|||
|
||||
func on_timeline_end():
|
||||
if not Engine.is_editor_hint():
|
||||
if settings.get_value('saving', 'save_definitions_on_end', true):
|
||||
DialogicSingleton.save_definitions()
|
||||
if settings.get_value('saving', 'clear_current_timeline', true):
|
||||
DialogicSingleton.set_current_timeline('')
|
||||
# TODO remove event_end in 2.0
|
||||
emit_signal("event_end", "timeline")
|
||||
|
@ -724,7 +728,6 @@ func add_choice_button(option: Dictionary):
|
|||
return
|
||||
|
||||
var button
|
||||
print(use_custom_choice_button())
|
||||
if use_custom_choice_button():
|
||||
button = get_custom_choice_button(option['label'])
|
||||
else:
|
||||
|
|
|
@ -152,6 +152,14 @@ static func get_current_timeline() -> String:
|
|||
return DialogicSingleton.get_current_timeline()
|
||||
|
||||
|
||||
## Sets the currently saved timeline.
|
||||
## Use this if you disabled current timeline autosave and want to control it yourself
|
||||
##
|
||||
## @param timelinie The new timeline to save.
|
||||
static func set_current_timeline(new_timeline: String) -> String:
|
||||
return DialogicSingleton.set_current_timeline(new_timeline)
|
||||
|
||||
|
||||
## Export the current Dialogic state.
|
||||
## This can be used as part of your own saving mechanism if you have one. If you use this,
|
||||
## you should also disable autosaving.
|
||||
|
|
|
@ -4,5 +4,5 @@ name="Dialogic"
|
|||
description="Create dialogs, characters and scenes to display conversations in your Godot games.
|
||||
https://github.com/coppolaemilio/dialogic"
|
||||
author="Emilio Coppola"
|
||||
version="1.1"
|
||||
version="1.2"
|
||||
script="dialogic.gd"
|
||||
|
|
|
@ -5,3 +5,7 @@ default="theme-1616657657.cfg"
|
|||
[dialog]
|
||||
|
||||
advanced_themes=true
|
||||
|
||||
[saving]
|
||||
|
||||
clear_current_timeline=false
|
||||
|
|
Loading…
Reference in a new issue