Browse Source

Update Dialogic and remove exp dialog plugin

Arnaud Vergnet 4 months ago
parent
commit
a1212b0f70
82 changed files with 779 additions and 3608 deletions
  1. 3
    7
      Main.gd
  2. 0
    76
      addons/EXP-System-Dialog/Dialog Editor/Dialog_Editor.tscn
  3. 0
    52
      addons/EXP-System-Dialog/Dialog Editor/Editor/Editor.tscn
  4. 0
    21
      addons/EXP-System-Dialog/Dialog Editor/Editor/editor.gd
  5. 0
    64
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.gd
  6. 0
    107
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.tscn
  7. 0
    74
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.gd
  8. 0
    23
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.tscn
  9. 0
    47
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.gd
  10. 0
    50
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.tscn
  11. 0
    69
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.gd
  12. 0
    25
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.tscn
  13. 0
    68
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.gd
  14. 0
    67
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.tscn
  15. 0
    201
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Line_Node.tscn
  16. 0
    1
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg
  17. 0
    34
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg.import
  18. 0
    184
      addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/line_node.gd
  19. 0
    224
      addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd
  20. BIN
      addons/EXP-System-Dialog/Images/de.png
  21. 0
    34
      addons/EXP-System-Dialog/Images/de.png.import
  22. BIN
      addons/EXP-System-Dialog/Images/icon.png
  23. 0
    34
      addons/EXP-System-Dialog/Images/icon.png.import
  24. BIN
      addons/EXP-System-Dialog/Images/se.png
  25. 0
    34
      addons/EXP-System-Dialog/Images/se.png.import
  26. 0
    83
      addons/EXP-System-Dialog/Reference_StoryReader/EXP_StoryReader.gd
  27. 0
    6
      addons/EXP-System-Dialog/Resource_BakedStory/EXP_BakedStory.gd
  28. 0
    9
      addons/EXP-System-Dialog/Resource_EditorStory/EXP_EditorStory.gd
  29. 0
    6
      addons/EXP-System-Dialog/Resource_NodeTemplate/EXP_NodeTemplate.gd
  30. 0
    109
      addons/EXP-System-Dialog/Story Editor/Dialog Record/Dialog_Record.tscn
  31. 0
    91
      addons/EXP-System-Dialog/Story Editor/Dialog Record/dialog_record.gd
  32. 0
    92
      addons/EXP-System-Dialog/Story Editor/Rename Record Box/Rename_Record_Box.tscn
  33. 0
    32
      addons/EXP-System-Dialog/Story Editor/Rename Record Box/rename_record_box.gd
  34. 0
    268
      addons/EXP-System-Dialog/Story Editor/Story_Editor.tscn
  35. 0
    753
      addons/EXP-System-Dialog/Story Editor/story_editor.gd
  36. 0
    7
      addons/EXP-System-Dialog/plugin.cfg
  37. 0
    87
      addons/EXP-System-Dialog/plugin.gd
  38. 5
    16
      addons/dialogic/Editor/CharacterEditor/CharacterEditor.gd
  39. 1
    1
      addons/dialogic/Editor/CharacterEditor/PortraitEntry.gd
  40. 9
    29
      addons/dialogic/Editor/DefinitionEditor/DefinitionEditor.gd
  41. 11
    22
      addons/dialogic/Editor/EditorView.gd
  42. 4
    4
      addons/dialogic/Editor/MasterTree/MasterTree.gd
  43. 1
    4
      addons/dialogic/Editor/Pieces/ChangeTimeline.gd
  44. 1
    1
      addons/dialogic/Editor/Pieces/CharacterJoinBlock.gd
  45. 1
    1
      addons/dialogic/Editor/Pieces/CharacterLeaveBlock.gd
  46. 1
    1
      addons/dialogic/Editor/Pieces/Common/CharacterPicker.gd
  47. 58
    0
      addons/dialogic/Editor/Pieces/Common/ConditionPicker.gd
  48. 13
    0
      addons/dialogic/Editor/Pieces/Common/ConditionPicker.tscn
  49. 2
    2
      addons/dialogic/Editor/Pieces/Common/DefinitionPicker.gd
  50. 23
    1
      addons/dialogic/Editor/Pieces/Common/DragController.gd
  51. 9
    1
      addons/dialogic/Editor/Pieces/IfCondition.gd
  52. 3
    6
      addons/dialogic/Editor/Pieces/IfCondition.tscn
  53. 2
    7
      addons/dialogic/Editor/SettingsEditor/SettingsEditor.gd
  54. 54
    47
      addons/dialogic/Editor/ThemeEditor/ThemeEditor.gd
  55. 9
    8
      addons/dialogic/Editor/ThemeEditor/ThemeEditor.tscn
  56. 13
    30
      addons/dialogic/Editor/TimelineEditor/TimelineEditor.gd
  57. 7
    3
      addons/dialogic/Nodes/Portrait.gd
  58. 72
    41
      addons/dialogic/Nodes/dialog_node.gd
  59. 7
    6
      addons/dialogic/Other/DialogicClass.gd
  60. 349
    0
      addons/dialogic/Other/DialogicResources.gd
  61. 41
    173
      addons/dialogic/Other/DialogicUtil.gd
  62. 3
    2
      addons/dialogic/dialogic.gd
  63. BIN
      characters/df-2.png
  64. 3
    3
      characters/df-2.png.import
  65. BIN
      characters/test/happy.png
  66. 0
    34
      characters/test/happy.png.import
  67. BIN
      characters/test/nice.png
  68. BIN
      characters/test/shock.png
  69. 0
    34
      characters/test/shock.png.import
  70. 0
    1
      dialogic/characters/character-1615795338.json
  71. 1
    0
      dialogic/characters/character-1615932195.json
  72. 6
    3
      dialogic/definitions.cfg
  73. 1
    1
      dialogic/settings.cfg
  74. 0
    14
      dialogic/themes/theme-1615795528.cfg
  75. 7
    0
      dialogic/themes/theme-1615930210.cfg
  76. 0
    1
      dialogic/timelines/timeline-1615795397.json
  77. 1
    0
      dialogic/timelines/timeline-1615930166.json
  78. 48
    0
      export_presets.cfg
  79. 0
    16
      git_api.gdnlib
  80. 0
    9
      git_api.gdns
  81. 0
    1
      json_example.json
  82. 10
    46
      project.godot

+ 3
- 7
Main.gd View File

@@ -1,17 +1,13 @@
1 1
 extends Node
2 2
 
3 3
 
4
-# Declare member variables here. Examples:
5
-# var a = 2
6
-# var b = "text"
7
-
8 4
 
9 5
 # Called when the node enters the scene tree for the first time.
10 6
 func _ready():
11 7
 	var new_dialog = Dialogic.start('timeline1')
12 8
 	add_child(new_dialog)
9
+	new_dialog.connect('dialogic_signal', self, "_on_Dialogic_signal_received")
13 10
 
14 11
 
15
-# Called every frame. 'delta' is the elapsed time since the previous frame.
16
-#func _process(delta):
17
-#	pass
12
+func _on_Dialogic_signal_received(value: String):
13
+	print('received ' + value)

+ 0
- 76
addons/EXP-System-Dialog/Dialog Editor/Dialog_Editor.tscn View File

@@ -1,76 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd" type="Script" id=1]
4
-
5
-[node name="Dialog_Editor" type="Control"]
6
-anchor_right = 1.0
7
-anchor_bottom = 1.0
8
-rect_min_size = Vector2( 0, 256 )
9
-script = ExtResource( 1 )
10
-__meta__ = {
11
-"_edit_use_anchors_": false
12
-}
13
-
14
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
15
-anchor_right = 1.0
16
-anchor_bottom = 1.0
17
-__meta__ = {
18
-"_edit_use_anchors_": false
19
-}
20
-
21
-[node name="VBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
22
-margin_right = 1024.0
23
-margin_bottom = 20.0
24
-
25
-[node name="Close_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
26
-margin_right = 47.0
27
-margin_bottom = 20.0
28
-hint_tooltip = "Close the Dialog Editor."
29
-text = "Close"
30
-
31
-[node name="Back_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
32
-margin_left = 51.0
33
-margin_right = 93.0
34
-margin_bottom = 20.0
35
-hint_tooltip = "Return to the Story Editor."
36
-text = "Back"
37
-
38
-[node name="VSeparator" type="VSeparator" parent="VBoxContainer/VBoxContainer"]
39
-margin_left = 97.0
40
-margin_right = 101.0
41
-margin_bottom = 20.0
42
-
43
-[node name="Add_Node_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
44
-margin_left = 105.0
45
-margin_right = 180.0
46
-margin_bottom = 20.0
47
-hint_tooltip = "Add a new node to the graph."
48
-text = "Add Node"
49
-
50
-[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/VBoxContainer"]
51
-margin_left = 184.0
52
-margin_right = 188.0
53
-margin_bottom = 20.0
54
-
55
-[node name="Human_Readable_LBL" type="Label" parent="VBoxContainer/VBoxContainer"]
56
-margin_left = 192.0
57
-margin_top = 3.0
58
-margin_right = 378.0
59
-margin_bottom = 17.0
60
-text = "Human Readable Description"
61
-
62
-[node name="GraphEdit" type="GraphEdit" parent="VBoxContainer"]
63
-margin_top = 24.0
64
-margin_right = 1024.0
65
-margin_bottom = 600.0
66
-size_flags_horizontal = 3
67
-size_flags_vertical = 3
68
-right_disconnects = true
69
-__meta__ = {
70
-"_edit_use_anchors_": false
71
-}
72
-[connection signal="pressed" from="VBoxContainer/VBoxContainer/Close_BTN" to="." method="_on_Close_BTN_pressed"]
73
-[connection signal="pressed" from="VBoxContainer/VBoxContainer/Back_BTN" to="." method="_on_Back_BTN_pressed"]
74
-[connection signal="pressed" from="VBoxContainer/VBoxContainer/Add_Node_BTN" to="." method="_on_Add_Node_BTN_pressed"]
75
-[connection signal="connection_request" from="VBoxContainer/GraphEdit" to="." method="_on_GraphEdit_connection_request"]
76
-[connection signal="disconnection_request" from="VBoxContainer/GraphEdit" to="." method="_on_GraphEdit_disconnection_request"]

+ 0
- 52
addons/EXP-System-Dialog/Dialog Editor/Editor/Editor.tscn View File

@@ -1,52 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Editor/editor.gd" type="Script" id=1]
4
-
5
-[node name="WindowDialog" type="WindowDialog"]
6
-anchor_left = 0.5
7
-anchor_top = 0.5
8
-anchor_right = 0.5
9
-anchor_bottom = 0.5
10
-margin_left = -540.0
11
-margin_top = -384.0
12
-margin_right = 540.0
13
-margin_bottom = 384.0
14
-window_title = "Node Editor"
15
-resizable = true
16
-script = ExtResource( 1 )
17
-__meta__ = {
18
-"_edit_use_anchors_": false
19
-}
20
-
21
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
22
-anchor_right = 1.0
23
-anchor_bottom = 1.0
24
-margin_left = 13.0
25
-margin_top = 13.0
26
-margin_right = -13.0
27
-margin_bottom = -13.0
28
-__meta__ = {
29
-"_edit_use_anchors_": false
30
-}
31
-
32
-[node name="TextEdit" type="TextEdit" parent="VBoxContainer"]
33
-margin_right = 1054.0
34
-margin_bottom = 718.0
35
-size_flags_horizontal = 3
36
-size_flags_vertical = 3
37
-smooth_scrolling = true
38
-__meta__ = {
39
-"_edit_use_anchors_": false
40
-}
41
-
42
-[node name="OK_BTN" type="Button" parent="VBoxContainer"]
43
-margin_left = 503.0
44
-margin_top = 722.0
45
-margin_right = 550.0
46
-margin_bottom = 742.0
47
-hint_tooltip = "Close the node editor."
48
-size_flags_horizontal = 4
49
-size_flags_vertical = 0
50
-text = "Close"
51
-[connection signal="text_changed" from="VBoxContainer/TextEdit" to="." method="_on_TextEdit_text_changed"]
52
-[connection signal="pressed" from="VBoxContainer/OK_BTN" to="." method="_on_OK_BTN_pressed"]

+ 0
- 21
addons/EXP-System-Dialog/Dialog Editor/Editor/editor.gd View File

@@ -1,21 +0,0 @@
1
-tool
2
-extends WindowDialog
3
-
4
-onready var _Text_Editor = self.get_node("VBoxContainer/TextEdit")
5
-
6
-var _Target_Node
7
-
8
-#Public Methods
9
-
10
-func set_target_node(node):
11
-	self._Target_Node = node
12
-	self._Text_Editor.text = node.get_text()
13
-
14
-#Callback Methods
15
-
16
-func _on_OK_BTN_pressed():
17
-	self.visible = false
18
-
19
-
20
-func _on_TextEdit_text_changed():
21
-	self._Target_Node.set_text(self._Text_Editor.text)

+ 0
- 64
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.gd View File

@@ -1,64 +0,0 @@
1
-tool
2
-extends VBoxContainer
3
-
4
-class_name Choice
5
-
6
-signal choice_changed(index, new_json_structure)
7
-signal choice_removed(index)
8
-
9
-onready var _ChoiceTitleLineEdit: LineEdit = self.get_node("HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer/ChoiceTitleLineEdit")
10
-onready var _ChoiceLabel: Label = self.get_node("HBoxContainer/MarginContainer/VBoxContainer/ChoiceLabel")
11
-onready var _Infobox: Infobox = self.get_node("HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/Infobox")
12
-onready var _ConditionsList: ConditionsList = self.get_node("HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/MarginContainer/ConditionsList")
13
-
14
-var _id : int = 0;
15
-
16
-var _json_structure := {
17
-	"title": "",
18
-	"conditions": []
19
-}
20
-
21
-#Callback Methods
22
-
23
-func _on_ChoiceTitleLineEdit_text_changed(new_text):
24
-	_json_structure.title = new_text
25
-	_emit_changed_signal()
26
-
27
-
28
-func _on_ChoiceRemoveButton_pressed():
29
-	emit_signal("choice_removed", _id)
30
-
31
-
32
-func _on_ConditionsList_conditions_changed(new_json_structure):
33
-	_json_structure.conditions = new_json_structure
34
-	_emit_changed_signal()
35
-
36
-
37
-func _on_Infobox_infobox_removed():
38
-	_json_structure.erase("infobox")
39
-	_emit_changed_signal()
40
-
41
-
42
-func _on_Infobox_infobox_changed(new_json_structure):
43
-	_json_structure.infobox = new_json_structure
44
-	_emit_changed_signal()
45
-
46
-
47
-#Public Methods
48
-
49
-func set_structure(new_json_structure):
50
-	_json_structure = new_json_structure
51
-	_ChoiceTitleLineEdit.set_text(_json_structure.title)
52
-	if ("infobox" in _json_structure):
53
-		_Infobox.set_structure(_json_structure.infobox)
54
-	_ConditionsList.set_structure(_json_structure.conditions)
55
-	
56
-
57
-func set_id(new_id):
58
-	self._id = new_id;
59
-	_ChoiceLabel.set_text("Choice #" + str(new_id + 1))
60
-
61
-#Private Methods
62
-
63
-func _emit_changed_signal():
64
-	emit_signal("choice_changed", _id, _json_structure)

+ 0
- 107
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.tscn View File

@@ -1,107 +0,0 @@
1
-[gd_scene load_steps=4 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.gd" type="Script" id=1]
4
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.tscn" type="PackedScene" id=2]
5
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.tscn" type="PackedScene" id=3]
6
-
7
-[node name="Choice" type="VBoxContainer"]
8
-margin_right = 272.0
9
-margin_bottom = 156.0
10
-script = ExtResource( 1 )
11
-__meta__ = {
12
-"_edit_use_anchors_": false
13
-}
14
-
15
-[node name="HBoxContainer" type="HBoxContainer" parent="."]
16
-margin_right = 272.0
17
-margin_bottom = 230.0
18
-
19
-[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer"]
20
-margin_right = 272.0
21
-margin_bottom = 230.0
22
-size_flags_horizontal = 3
23
-custom_constants/margin_right = 5
24
-custom_constants/margin_top = 5
25
-custom_constants/margin_left = 5
26
-custom_constants/margin_bottom = 5
27
-__meta__ = {
28
-"_edit_use_anchors_": false
29
-}
30
-
31
-[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/MarginContainer"]
32
-margin_left = 5.0
33
-margin_top = 5.0
34
-margin_right = 267.0
35
-margin_bottom = 225.0
36
-size_flags_horizontal = 3
37
-__meta__ = {
38
-"_edit_use_anchors_": false
39
-}
40
-
41
-[node name="ChoiceLabel" type="Label" parent="HBoxContainer/MarginContainer/VBoxContainer"]
42
-margin_right = 262.0
43
-margin_bottom = 14.0
44
-text = "Choice #1"
45
-align = 1
46
-
47
-[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/MarginContainer/VBoxContainer"]
48
-margin_top = 18.0
49
-margin_right = 262.0
50
-margin_bottom = 220.0
51
-
52
-[node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer"]
53
-margin_right = 262.0
54
-margin_bottom = 202.0
55
-
56
-[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2"]
57
-margin_right = 238.0
58
-margin_bottom = 202.0
59
-size_flags_horizontal = 3
60
-
61
-[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
62
-margin_right = 238.0
63
-margin_bottom = 24.0
64
-size_flags_horizontal = 3
65
-
66
-[node name="ChoiceTitleLabel" type="Label" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer"]
67
-margin_top = 5.0
68
-margin_right = 32.0
69
-margin_bottom = 19.0
70
-text = "Title:"
71
-
72
-[node name="ChoiceTitleLineEdit" type="LineEdit" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer"]
73
-margin_left = 36.0
74
-margin_right = 238.0
75
-margin_bottom = 24.0
76
-size_flags_horizontal = 3
77
-
78
-[node name="Infobox" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer" instance=ExtResource( 3 )]
79
-margin_bottom = 164.0
80
-
81
-[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
82
-margin_top = 168.0
83
-margin_right = 238.0
84
-margin_bottom = 202.0
85
-custom_constants/margin_right = 5
86
-custom_constants/margin_top = 5
87
-custom_constants/margin_left = 5
88
-custom_constants/margin_bottom = 5
89
-
90
-[node name="ConditionsList" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/MarginContainer" instance=ExtResource( 2 )]
91
-margin_bottom = 29.0
92
-
93
-[node name="ChoiceRemoveButton" type="Button" parent="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2"]
94
-margin_left = 242.0
95
-margin_right = 262.0
96
-margin_bottom = 202.0
97
-text = "X"
98
-
99
-[node name="HSeparator" type="HSeparator" parent="."]
100
-margin_top = 234.0
101
-margin_right = 272.0
102
-margin_bottom = 238.0
103
-[connection signal="text_changed" from="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer/ChoiceTitleLineEdit" to="." method="_on_ChoiceTitleLineEdit_text_changed"]
104
-[connection signal="infobox_changed" from="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/Infobox" to="." method="_on_Infobox_infobox_changed"]
105
-[connection signal="infobox_removed" from="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/Infobox" to="." method="_on_Infobox_infobox_removed"]
106
-[connection signal="conditions_changed" from="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/VBoxContainer/MarginContainer/ConditionsList" to="." method="_on_ConditionsList_conditions_changed"]
107
-[connection signal="pressed" from="HBoxContainer/MarginContainer/VBoxContainer/VBoxContainer/HBoxContainer2/ChoiceRemoveButton" to="." method="_on_ChoiceRemoveButton_pressed"]

+ 0
- 74
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.gd View File

@@ -1,74 +0,0 @@
1
-tool
2
-extends VBoxContainer
3
-
4
-class_name ChoicesList
5
-
6
-signal choices_changed(new_json_structure)
7
-
8
-var _choice_scene = preload("res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/Choice/Choice.tscn")
9
-
10
-onready var _VBoxContainer: VBoxContainer = self.get_node("VBoxContainer")
11
-
12
-var _json_structure: Array = []
13
-var _nodes: Array = []
14
-
15
-#Callback Methods
16
-
17
-func _on_choice_changed(index, new_structure):
18
-	_json_structure[index] = new_structure
19
-	_emit_changed_signal()
20
-
21
-func _on_choice_removed(index):
22
-	_json_structure.remove(index)
23
-	_remove_choice_node(index)
24
-	_emit_changed_signal()
25
-
26
-func _on_ChoiceAddButton_pressed():
27
-	add_choice()
28
-
29
-
30
-#Public Methods
31
-
32
-func add_choice():
33
-	_json_structure.append({
34
-		"title": "",
35
-		"conditions": []
36
-	})
37
-	_add_choice_node(_json_structure.size() - 1)
38
-	_emit_changed_signal()
39
-
40
-func set_structure(new_json_structure):
41
-	_json_structure = new_json_structure
42
-	_clear_choice_nodes()
43
-	for i in range(0, _json_structure.size()):
44
-		var node: Choice = _add_choice_node(i)
45
-		node.set_structure(_json_structure[i])
46
-
47
-#Private Methods
48
-
49
-func _emit_changed_signal():
50
-	emit_signal("choices_changed", _json_structure)
51
-
52
-func _add_choice_node(id: int):
53
-	var node: Choice = _choice_scene.instance()
54
-	_VBoxContainer.add_child(node)
55
-	node.set_id(id)
56
-	_nodes.append(node)
57
-	node.connect("choice_changed", self, "_on_choice_changed")
58
-	node.connect("choice_removed", self, "_on_choice_removed")
59
-	return node
60
-
61
-func _remove_choice_node(index):
62
-	# Remove the node
63
-	if (index >= 0 and index < _nodes.size()):
64
-		_nodes[index].queue_free()
65
-		_nodes.remove(index)
66
-		# Update remaining nodes indexes
67
-		for i in range(0, _nodes.size()):
68
-			_nodes[i].set_id(i)
69
-
70
-
71
-func _clear_choice_nodes():
72
-	_nodes.clear()
73
-	for node in _VBoxContainer.get_children():
74
-		node.queue_free()

+ 0
- 23
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.tscn View File

@@ -1,23 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.gd" type="Script" id=2]
4
-
5
-[node name="ChoicesList" type="VBoxContainer"]
6
-margin_top = 242.0
7
-margin_right = 272.0
8
-margin_bottom = 422.0
9
-script = ExtResource( 2 )
10
-__meta__ = {
11
-"_edit_use_anchors_": false
12
-}
13
-
14
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
15
-margin_right = 272.0
16
-size_flags_horizontal = 3
17
-
18
-[node name="ChoiceAddButton" type="Button" parent="."]
19
-margin_top = 4.0
20
-margin_right = 272.0
21
-margin_bottom = 24.0
22
-text = "Add choice"
23
-[connection signal="pressed" from="ChoiceAddButton" to="." method="_on_ChoiceAddButton_pressed"]

+ 0
- 47
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.gd View File

@@ -1,47 +0,0 @@
1
-tool
2
-extends VBoxContainer
3
-
4
-class_name Condition
5
-
6
-signal condition_changed(index, new_json_structure)
7
-signal condition_removed(index)
8
-
9
-onready var _ConditionLabel: Label = self.get_node("ContitionLabel")
10
-onready var _ContitionNameLineEdit: LineEdit = self.get_node("HBoxContainer2/ContitionNameLineEdit")
11
-onready var _ContitionValueSpinBox: SpinBox = self.get_node("HBoxContainer2/ContitionValueSpinBox")
12
-
13
-var _id : int = 0;
14
-
15
-var _json_structure = {
16
-	"id": "",
17
-	"value": 0
18
-}
19
-
20
-#Callback Methods
21
-
22
-func _on_ContitionNameLineEdit_text_changed(new_text):
23
-	_json_structure.id = new_text
24
-	emit_signal("condition_changed", _id, _json_structure)
25
-
26
-
27
-func _on_ContitionValueSpinBox_value_changed(value):
28
-	_json_structure.value = value
29
-	emit_signal("condition_changed", _id, _json_structure)
30
-
31
-
32
-func _on_ContitionRemoveButton_pressed():
33
-	emit_signal("condition_removed", _id)
34
-
35
-#Public Methods
36
-
37
-func set_structure(new_json_structure):
38
-	_json_structure = new_json_structure
39
-	_ContitionNameLineEdit.text = _json_structure.id
40
-	_ContitionValueSpinBox.value = _json_structure.value
41
-	
42
-
43
-
44
-func set_id(new_id):
45
-	self._id = new_id;
46
-	_ConditionLabel.set_text("Condition #" + str(new_id + 1))
47
-

+ 0
- 50
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.tscn View File

@@ -1,50 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.gd" type="Script" id=1]
4
-
5
-[node name="Condition" type="VBoxContainer"]
6
-margin_right = 228.0
7
-margin_bottom = 50.0
8
-size_flags_horizontal = 3
9
-script = ExtResource( 1 )
10
-__meta__ = {
11
-"_edit_use_anchors_": false
12
-}
13
-
14
-[node name="HSeparator2" type="HSeparator" parent="."]
15
-margin_right = 228.0
16
-margin_bottom = 4.0
17
-__meta__ = {
18
-"_edit_use_anchors_": false
19
-}
20
-
21
-[node name="ContitionLabel" type="Label" parent="."]
22
-margin_top = 8.0
23
-margin_right = 228.0
24
-margin_bottom = 22.0
25
-text = "Condition #1"
26
-
27
-[node name="HBoxContainer2" type="HBoxContainer" parent="."]
28
-margin_top = 26.0
29
-margin_right = 228.0
30
-margin_bottom = 50.0
31
-size_flags_horizontal = 3
32
-
33
-[node name="ContitionNameLineEdit" type="LineEdit" parent="HBoxContainer2"]
34
-margin_right = 127.0
35
-margin_bottom = 24.0
36
-size_flags_horizontal = 3
37
-
38
-[node name="ContitionValueSpinBox" type="SpinBox" parent="HBoxContainer2"]
39
-margin_left = 131.0
40
-margin_right = 205.0
41
-margin_bottom = 24.0
42
-
43
-[node name="ContitionRemoveButton" type="Button" parent="HBoxContainer2"]
44
-margin_left = 209.0
45
-margin_right = 228.0
46
-margin_bottom = 24.0
47
-text = "x"
48
-[connection signal="text_changed" from="HBoxContainer2/ContitionNameLineEdit" to="." method="_on_ContitionNameLineEdit_text_changed"]
49
-[connection signal="value_changed" from="HBoxContainer2/ContitionValueSpinBox" to="." method="_on_ContitionValueSpinBox_value_changed"]
50
-[connection signal="pressed" from="HBoxContainer2/ContitionRemoveButton" to="." method="_on_ContitionRemoveButton_pressed"]

+ 0
- 69
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.gd View File

@@ -1,69 +0,0 @@
1
-tool
2
-extends VBoxContainer
3
-
4
-class_name ConditionsList
5
-
6
-signal conditions_changed(new_json_structure)
7
-
8
-var _condition_scene = preload("res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/Condition/Condition.tscn")
9
-
10
-onready var _VBoxContainer = self.get_node("VBoxContainer")
11
-
12
-var _json_structure = []
13
-var _nodes = []
14
-
15
-#Callback Methods
16
-
17
-func _on_condition_changed(index, new_structure):
18
-	_json_structure[index] = new_structure
19
-	_emit_changed_signal()
20
-
21
-func _on_condition_removed(index):
22
-	_json_structure.remove(index)
23
-	_remove_choice_node(index)
24
-	_emit_changed_signal()
25
-
26
-func _on_ContitionAddButton_pressed():
27
-	add_condition(
28
-		{
29
-			"id": "",
30
-			"value": 0
31
-		}, 
32
-		_json_structure.size() - 1
33
-	)
34
-
35
-#Public Methods
36
-
37
-func set_structure(new_json_structure):
38
-	_json_structure = new_json_structure
39
-	for i in range(0, _json_structure.size()):
40
-		add_condition(_json_structure[0], i)
41
-
42
-
43
-func add_condition(structure: Dictionary, id: int):
44
-	_json_structure.append(structure)
45
-	_add_choice_node(structure, id)
46
-	_emit_changed_signal()
47
-
48
-#Private Methods
49
-
50
-func _emit_changed_signal():
51
-	emit_signal("conditions_changed", _json_structure)
52
-
53
-func _add_choice_node(structure: Dictionary, id: int):
54
-	var node: Condition = _condition_scene.instance()
55
-	_VBoxContainer.add_child(node)
56
-	node.set_id(id)
57
-	node.set_structure(structure)
58
-	_nodes.append(node)
59
-	node.connect("condition_changed", self, "_on_condition_changed")
60
-	node.connect("condition_removed", self, "_on_condition_removed")
61
-	return node
62
-
63
-func _remove_choice_node(index):
64
-	# Remove the node
65
-	_nodes[index].queue_free()
66
-	_nodes.remove(index)
67
-	# Update remaining nodes indexes
68
-	for i in range(0, _nodes.size()):
69
-		_nodes[i].set_id(i)

+ 0
- 25
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.tscn View File

@@ -1,25 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.gd" type="Script" id=1]
4
-
5
-[node name="ConditionsList" type="VBoxContainer"]
6
-margin_left = 5.0
7
-margin_top = 5.0
8
-margin_right = 233.0
9
-margin_bottom = 79.0
10
-size_flags_horizontal = 3
11
-script = ExtResource( 1 )
12
-__meta__ = {
13
-"_edit_use_anchors_": false
14
-}
15
-
16
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
17
-margin_right = 228.0
18
-size_flags_horizontal = 3
19
-
20
-[node name="ContitionAddButton" type="Button" parent="."]
21
-margin_top = 4.0
22
-margin_right = 228.0
23
-margin_bottom = 24.0
24
-text = "Add condition"
25
-[connection signal="pressed" from="ContitionAddButton" to="." method="_on_ContitionAddButton_pressed"]

+ 0
- 68
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.gd View File

@@ -1,68 +0,0 @@
1
-tool
2
-extends VBoxContainer
3
-
4
-class_name Infobox
5
-
6
-signal infobox_changed(new_json_structure)
7
-signal infobox_removed()
8
-
9
-onready var _TextEdit: TextEdit = self.get_node("HBoxContainer/VBoxContainer/TextEdit")
10
-onready var _CreateButton: Button = self.get_node("CreateButton")
11
-onready var _HBoxContainer: HBoxContainer = self.get_node("HBoxContainer")
12
-onready var _ConditionsList: ConditionsList = self.get_node("HBoxContainer/VBoxContainer/ConditionsList")
13
-
14
-var _json_structure = {
15
-	"text": "",
16
-	"conditions": []
17
-}
18
-
19
-#Virtual Methods
20
-
21
-func _ready():
22
-	_CreateButton.show()
23
-	_HBoxContainer.hide()
24
-
25
-
26
-#Callback Methods
27
-
28
-func _on_RemoveInfoboxButton_pressed():
29
-	_disable_infobox()
30
-	emit_signal("infobox_removed")
31
-
32
-func _on_ConditionsList_conditions_changed(new_json_structure):
33
-	_json_structure.conditions = new_json_structure
34
-	_emit_changed_signal()
35
-
36
-func _on_TextEdit_text_changed():
37
-	_json_structure.text = self._TextEdit.get_text()
38
-	_emit_changed_signal()
39
-
40
-
41
-func _on_CreateButton_pressed():
42
-	_enable_infobox()
43
-	_emit_changed_signal()
44
-
45
-#Public Methods
46
-
47
-func set_structure(new_json_structure):
48
-	_json_structure = new_json_structure
49
-	_TextEdit.set_text(_json_structure.text)
50
-	_ConditionsList.set_structure(_json_structure.conditions)
51
-	_enable_infobox()
52
-
53
-#Private Methods
54
-
55
-func _enable_infobox():
56
-	_CreateButton.hide()
57
-	_HBoxContainer.show()
58
-
59
-
60
-func _disable_infobox():
61
-	_CreateButton.show()
62
-	_HBoxContainer.hide()
63
-
64
-
65
-func _emit_changed_signal():
66
-	emit_signal("infobox_changed", _json_structure)
67
-
68
-

+ 0
- 67
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.tscn View File

@@ -1,67 +0,0 @@
1
-[gd_scene load_steps=3 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Infobox/Infobox.gd" type="Script" id=1]
4
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ConditionsList/ConditionsList.tscn" type="PackedScene" id=2]
5
-
6
-[node name="Infobox" type="VBoxContainer"]
7
-margin_top = 28.0
8
-margin_right = 238.0
9
-margin_bottom = 112.0
10
-script = ExtResource( 1 )
11
-__meta__ = {
12
-"_edit_use_anchors_": false
13
-}
14
-
15
-[node name="HBoxContainer" type="HBoxContainer" parent="."]
16
-margin_right = 238.0
17
-margin_bottom = 112.0
18
-
19
-[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
20
-margin_right = 215.0
21
-margin_bottom = 112.0
22
-size_flags_horizontal = 3
23
-
24
-[node name="HSeparator" type="HSeparator" parent="HBoxContainer/VBoxContainer"]
25
-margin_right = 215.0
26
-margin_bottom = 4.0
27
-
28
-[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer"]
29
-margin_top = 8.0
30
-margin_right = 215.0
31
-margin_bottom = 22.0
32
-text = "Infobox"
33
-align = 1
34
-
35
-[node name="TextEdit" type="TextEdit" parent="HBoxContainer/VBoxContainer"]
36
-margin_top = 26.0
37
-margin_right = 215.0
38
-margin_bottom = 76.0
39
-rect_min_size = Vector2( 0, 50 )
40
-size_flags_horizontal = 3
41
-
42
-[node name="ConditionsList" parent="HBoxContainer/VBoxContainer" instance=ExtResource( 2 )]
43
-margin_left = 0.0
44
-margin_top = 80.0
45
-margin_right = 215.0
46
-margin_bottom = 104.0
47
-
48
-[node name="HSeparator2" type="HSeparator" parent="HBoxContainer/VBoxContainer"]
49
-margin_top = 108.0
50
-margin_right = 215.0
51
-margin_bottom = 112.0
52
-
53
-[node name="RemoveInfoboxButton" type="Button" parent="HBoxContainer"]
54
-margin_left = 219.0
55
-margin_right = 238.0
56
-margin_bottom = 112.0
57
-text = "x"
58
-
59
-[node name="CreateButton" type="Button" parent="."]
60
-margin_top = 116.0
61
-margin_right = 238.0
62
-margin_bottom = 136.0
63
-text = "Create Infobox"
64
-[connection signal="text_changed" from="HBoxContainer/VBoxContainer/TextEdit" to="." method="_on_TextEdit_text_changed"]
65
-[connection signal="conditions_changed" from="HBoxContainer/VBoxContainer/ConditionsList" to="." method="_on_ConditionsList_conditions_changed"]
66
-[connection signal="pressed" from="HBoxContainer/RemoveInfoboxButton" to="." method="_on_RemoveInfoboxButton_pressed"]
67
-[connection signal="pressed" from="CreateButton" to="." method="_on_CreateButton_pressed"]

+ 0
- 201
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Line_Node.tscn View File

@@ -1,201 +0,0 @@
1
-[gd_scene load_steps=4 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/line_node.gd" type="Script" id=1]
4
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg" type="Texture" id=2]
5
-[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/ChoicesList/ChoicesList.tscn" type="PackedScene" id=3]
6
-
7
-[node name="Line" type="GraphNode"]
8
-margin_right = 324.0
9
-margin_bottom = 375.0
10
-rect_min_size = Vector2( 324, 137 )
11
-title = "Line"
12
-offset = Vector2( 40, 40 )
13
-show_close = true
14
-resizable = true
15
-slot/0/left_enabled = true
16
-slot/0/left_type = 0
17
-slot/0/left_color = Color( 1, 1, 1, 1 )
18
-slot/0/right_enabled = true
19
-slot/0/right_type = 0
20
-slot/0/right_color = Color( 1, 1, 1, 1 )
21
-slot/1/left_enabled = false
22
-slot/1/left_type = 0
23
-slot/1/left_color = Color( 1, 1, 1, 1 )
24
-slot/1/right_enabled = false
25
-slot/1/right_type = 0
26
-slot/1/right_color = Color( 1, 1, 1, 1 )
27
-script = ExtResource( 1 )
28
-__meta__ = {
29
-"_edit_use_anchors_": false
30
-}
31
-
32
-[node name="MarginContainer" type="MarginContainer" parent="."]
33
-margin_left = 16.0
34
-margin_top = 39.0
35
-margin_right = 308.0
36
-margin_bottom = 329.0
37
-custom_constants/margin_right = 10
38
-custom_constants/margin_top = 10
39
-custom_constants/margin_left = 10
40
-custom_constants/margin_bottom = 10
41
-
42
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
43
-margin_left = 10.0
44
-margin_top = 10.0
45
-margin_right = 282.0
46
-margin_bottom = 280.0
47
-size_flags_horizontal = 3
48
-size_flags_vertical = 3
49
-__meta__ = {
50
-"_edit_use_anchors_": false
51
-}
52
-
53
-[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
54
-margin_right = 272.0
55
-margin_bottom = 70.0
56
-
57
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
58
-margin_right = 272.0
59
-margin_bottom = 70.0
60
-size_flags_horizontal = 3
61
-
62
-[node name="SpeakerLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
63
-margin_right = 272.0
64
-margin_bottom = 14.0
65
-text = "Speaker"
66
-align = 1
67
-
68
-[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
69
-margin_left = 89.0
70
-margin_top = 18.0
71
-margin_right = 183.0
72
-margin_bottom = 42.0
73
-size_flags_horizontal = 4
74
-
75
-[node name="SpeakerIdLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer"]
76
-margin_top = 5.0
77
-margin_right = 16.0
78
-margin_bottom = 19.0
79
-text = "id:"
80
-
81
-[node name="SpeakerIdSpinBox" type="SpinBox" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer"]
82
-margin_left = 20.0
83
-margin_right = 94.0
84
-margin_bottom = 24.0
85
-
86
-[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer"]
87
-margin_top = 46.0
88
-margin_right = 272.0
89
-margin_bottom = 70.0
90
-
91
-[node name="SpeakerEmotionLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2"]
92
-margin_top = 5.0
93
-margin_right = 57.0
94
-margin_bottom = 19.0
95
-text = "Emotion:"
96
-
97
-[node name="SpeakerEmotionLineEdit" type="LineEdit" parent="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2"]
98
-margin_left = 61.0
99
-margin_right = 272.0
100
-margin_bottom = 24.0
101
-size_flags_horizontal = 3
102
-
103
-[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
104
-margin_top = 74.0
105
-margin_right = 272.0
106
-margin_bottom = 78.0
107
-
108
-[node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
109
-margin_top = 82.0
110
-margin_right = 272.0
111
-margin_bottom = 124.0
112
-
113
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer4"]
114
-margin_right = 272.0
115
-margin_bottom = 42.0
116
-size_flags_horizontal = 3
117
-
118
-[node name="SceneLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer"]
119
-margin_right = 272.0
120
-margin_bottom = 14.0
121
-text = "Scene"
122
-align = 1
123
-
124
-[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer"]
125
-margin_left = 89.0
126
-margin_top = 18.0
127
-margin_right = 183.0
128
-margin_bottom = 42.0
129
-size_flags_horizontal = 4
130
-
131
-[node name="SceneIdLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer/HBoxContainer"]
132
-margin_top = 5.0
133
-margin_right = 16.0
134
-margin_bottom = 19.0
135
-text = "id:"
136
-
137
-[node name="SceneIdSpinBox" type="SpinBox" parent="MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer/HBoxContainer"]
138
-margin_left = 20.0
139
-margin_right = 94.0
140
-margin_bottom = 24.0
141
-
142
-[node name="HSeparator2" type="HSeparator" parent="MarginContainer/VBoxContainer"]
143
-margin_top = 128.0
144
-margin_right = 272.0
145
-margin_bottom = 132.0
146
-
147
-[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
148
-margin_top = 136.0
149
-margin_right = 272.0
150
-margin_bottom = 234.0
151
-
152
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
153
-margin_right = 272.0
154
-margin_bottom = 98.0
155
-size_flags_horizontal = 3
156
-
157
-[node name="DialogLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
158
-margin_right = 272.0
159
-margin_bottom = 14.0
160
-text = "Message"
161
-align = 1
162
-
163
-[node name="MessageTextEdit" type="TextEdit" parent="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
164
-margin_top = 18.0
165
-margin_right = 272.0
166
-margin_bottom = 98.0
167
-rect_min_size = Vector2( 256, 80 )
168
-size_flags_horizontal = 3
169
-size_flags_vertical = 3
170
-smooth_scrolling = true
171
-
172
-[node name="Editor_BTN" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
173
-visible = false
174
-margin_left = 260.0
175
-margin_right = 292.0
176
-margin_bottom = 82.0
177
-rect_min_size = Vector2( 32, 0 )
178
-hint_tooltip = "Expand this node's text editor."
179
-icon = ExtResource( 2 )
180
-expand_icon = true
181
-
182
-[node name="HSeparator3" type="HSeparator" parent="MarginContainer/VBoxContainer"]
183
-margin_top = 238.0
184
-margin_right = 272.0
185
-margin_bottom = 242.0
186
-__meta__ = {
187
-"_edit_use_anchors_": false
188
-}
189
-
190
-[node name="ChoicesList" parent="MarginContainer/VBoxContainer" instance=ExtResource( 3 )]
191
-margin_top = 246.0
192
-margin_bottom = 270.0
193
-[connection signal="close_request" from="." to="." method="_on_Line_close_request"]
194
-[connection signal="offset_changed" from="." to="." method="_on_Line_offset_changed"]
195
-[connection signal="resize_request" from="." to="." method="_on_Line_resize_request"]
196
-[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer/SpeakerIdSpinBox" to="." method="_on_SpeakerIdSpinBox_value_changed"]
197
-[connection signal="text_changed" from="MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2/SpeakerEmotionLineEdit" to="." method="_on_SpeakerEmotionLineEdit_text_changed"]
198
-[connection signal="value_changed" from="MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer/HBoxContainer/SceneIdSpinBox" to="." method="_on_SceneIdSpinBox_value_changed"]
199
-[connection signal="text_changed" from="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer/MessageTextEdit" to="." method="_on_MessageTextEdit_text_changed"]
200
-[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Editor_BTN" to="." method="_on_Editor_BTN_pressed"]
201
-[connection signal="choices_changed" from="MarginContainer/VBoxContainer/ChoicesList" to="." method="_on_ChoicesList_choices_changed"]

+ 0
- 1
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg View File

@@ -1 +0,0 @@
1
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 1v5l1.793-1.793 2.5 2.5 1.4141-1.4141-2.5-2.5 1.793-1.793h-5zm9 0 1.793 1.793-2.5 2.5 1.4141 1.4141 2.5-2.5 1.793 1.793v-5h-5zm-4.707 8.293-2.5 2.5-1.793-1.793v5h5l-1.793-1.793 2.5-2.5-1.4141-1.4141zm5.4141 0-1.4141 1.4141 2.5 2.5-1.793 1.793h5v-5l-1.793 1.793-2.5-2.5z" fill="#e0e0e0"/></svg>

+ 0
- 34
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg.import View File

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

+ 0
- 184
addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/line_node.gd View File

@@ -1,184 +0,0 @@
1
-tool
2
-extends GraphNode
3
-
4
-class_name LineNode
5
-
6
-signal changed_offset(nid, vec2)
7
-signal changed_size(this)
8
-signal changed_slots(this)
9
-signal erased(this)
10
-signal pressed_editor(this)
11
-signal pressed_load(this)
12
-signal pressed_save(this)
13
-signal text_changed(nid, new_text)
14
-
15
-
16
-onready var _SpeakerIdSpinBox: SpinBox = self.get_node("MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer/SpeakerIdSpinBox")
17
-onready var _SpeakerEmotionLineEdit: LineEdit = self.get_node("MarginContainer/VBoxContainer/HBoxContainer3/VBoxContainer/HBoxContainer2/SpeakerEmotionLineEdit")
18
-onready var _SceneIdSpinBox: SpinBox = self.get_node("MarginContainer/VBoxContainer/HBoxContainer4/VBoxContainer/HBoxContainer/SceneIdSpinBox")
19
-onready var _MessageTextEdit : TextEdit= self.get_node("MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer/MessageTextEdit")
20
-onready var _ChoicesList: ChoicesList = self.get_node("MarginContainer/VBoxContainer/ChoicesList")
21
-
22
-var _nid : int = 0
23
-var _slot_amount : int = 1
24
-
25
-var json_structure = {
26
-	"speaker": {
27
-		"id": 0,
28
-		"emotion": "happy"
29
-	},
30
-	"scene": {
31
-		"id": 0
32
-	},
33
-	"dialog": {
34
-		"message": "",
35
-		"choices_multiple": []
36
-	}
37
-}
38
-
39
-
40
-#Virtual Methods
41
-
42
-func _ready():
43
-	self._update_slots()
44
-
45
-#Callback Methods
46
-
47
-func _on_Editor_BTN_pressed():
48
-	self.emit_signal("pressed_editor", self)
49
-
50
-
51
-func _on_Line_close_request():
52
-	self.emit_signal("erased", self)
53
-
54
-
55
-func _on_Line_offset_changed():
56
-	self.emit_signal("changed_offset", self._nid, self.offset)
57
-
58
-
59
-func _on_Line_resize_request(new_minsize):
60
-	self.rect_size = new_minsize
61
-	self.emit_signal("changed_size", self)
62
-
63
-
64
-func _on_Load_BTN_pressed():
65
-	self.emit_signal("pressed_load", self)
66
-
67
-
68
-func _on_Save_BTN_pressed():
69
-	self.emit_signal("pressed_save", self)
70
-
71
-
72
-func _on_MessageTextEdit_text_changed():
73
-	json_structure.dialog.message = self._MessageTextEdit.text
74
-	_emit_text()
75
-
76
-func _on_SceneIdSpinBox_value_changed(value):
77
-	json_structure.scene.id = value
78
-	_emit_text()
79
-
80
-
81
-func _on_SpeakerEmotionLineEdit_text_changed(new_text):
82
-	json_structure.speaker.emotion = new_text
83
-	_emit_text()
84
-
85
-
86
-func _on_SpeakerIdSpinBox_value_changed(value):
87
-	json_structure.speaker.id = value
88
-	_emit_text()
89
-
90
-func _on_ChoicesList_choices_changed(new_json_structure):
91
-	json_structure.dialog.choices_multiple = new_json_structure
92
-	var slot_number = json_structure.dialog.choices_multiple.size()
93
-	# Always have at least one slot
94
-	if slot_number == 0:
95
-		slot_number = 1
96
-	if (self.get_slot_amount() != slot_number):
97
-		self.set_slot_amount(slot_number)
98
-		self._update_slots()
99
-		self.emit_signal("changed_slots", self)
100
-	else:
101
-		_update_slots_labels()
102
-	_emit_text()
103
-
104
-
105
-#Public Methods
106
-
107
-func get_nid() -> int:
108
-	return self._nid
109
-
110
-
111
-func get_slot_amount() -> int:
112
-	return self._slot_amount
113
-
114
-
115
-func get_text() -> String:
116
-	return JSON.print(json_structure, "\t")
117
-
118
-
119
-func set_nid(new_nid):
120
-	self._nid = new_nid
121
-	var new_name = "NID " + str(new_nid)
122
-	self.title = new_name
123
-	self.name = new_name
124
-
125
-
126
-func set_slot_amount(new_amount : int):
127
-	self._slot_amount = new_amount
128
-
129
-
130
-func set_text(new_text : String):
131
-	json_structure = JSON.parse(new_text).get_result()
132
-	_update_components()
133
-	_emit_text()
134
-
135
-#Private Methods
136
-
137
-func _update_components():
138
-	_SpeakerIdSpinBox.set_value(json_structure.speaker.id)
139
-	_SpeakerEmotionLineEdit.set_text(json_structure.speaker.emotion);
140
-	_SceneIdSpinBox.set_value(json_structure.scene.id)
141
-	_MessageTextEdit.set_text(json_structure.dialog.message)
142
-	_ChoicesList.set_structure(json_structure.dialog.choices_multiple)
143
-
144
-func _emit_text():
145
-	self.emit_signal("text_changed", self._nid, get_text())
146
-	
147
-
148
-func _clear_link_labels():
149
-	var children = self.get_children()
150
-	for child in children:
151
-		if child is Label:
152
-			child.queue_free()
153
-
154
-
155
-func _update_slots_labels():
156
-	for slot in range(0, self.get_slot_amount()):
157
-		var output_link_label = self.get_children()[slot]
158
-		if (output_link_label is Label):
159
-			output_link_label.text = self._get_choice_name(slot)
160
-
161
-func _get_choice_name(index):
162
-	var choices: Array = json_structure.dialog.choices_multiple;
163
-	if (choices.size() > 0):
164
-		return choices[index].title
165
-	else:
166
-		return "Next"
167
-
168
-func _update_slots():
169
-	self.clear_all_slots()
170
-	self._clear_link_labels()
171
-	self.set_slot(0, true, 0, Color(1.0, 1.0, 1.0, 1.0), true, 0, Color(1.0, 1.0, 1.0, 1.0), null, null)
172
-	var base_link_label = Label.new()
173
-	base_link_label.text = self._get_choice_name(0)
174
-	base_link_label.align = Label.ALIGN_RIGHT
175
-	self.add_child(base_link_label)
176
-	self.move_child(base_link_label, 0)
177
-	var last_output_link_label = base_link_label
178
-	for slot in range(1, self._slot_amount):
179
-		self.set_slot(slot, false, 0, Color(1.0, 1.0, 1.0, 1.0), true, 0, Color(1.0, 1.0, 1.0, 1.0), null, null)
180
-		var output_link_label = Label.new()
181
-		output_link_label.text = self._get_choice_name(slot)
182
-		output_link_label.align = Label.ALIGN_RIGHT
183
-		self.add_child_below_node(last_output_link_label, output_link_label)
184
-		last_output_link_label = output_link_label

+ 0
- 224
addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd View File

@@ -1,224 +0,0 @@
1
-tool
2
-extends Control
3
-
4
-signal back_BTN_pressed
5
-signal close_BTN_pressed
6
-
7
-onready var _Graph = self.get_node("VBoxContainer/GraphEdit")
8
-onready var _Human_Readable_LBL = self.get_node("VBoxContainer/VBoxContainer/Human_Readable_LBL")
9
-
10
-var _Editor_TSCN = preload("res://addons/EXP-System-Dialog/Dialog Editor/Editor/Editor.tscn")
11
-var _LineNode = preload("res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Line_Node.tscn")
12
-var _NodeTemplate= preload("res://addons/EXP-System-Dialog/Resource_NodeTemplate/EXP_NodeTemplate.gd")
13
-
14
-var _did : int = -1
15
-var _Editor
16
-var _Load_Template : EditorFileDialog
17
-var _Save_Template_As : EditorFileDialog
18
-var _Story_Editor
19
-var _Target_Node
20
-
21
-#Virtual Methods
22
-
23
-func _ready():
24
-	self._setup_dialogs()
25
-	self._Editor = _Editor_TSCN.instance()
26
-	self.add_child(self._Editor)
27
-
28
-#Callback Methods
29
-
30
-func _on_Add_Node_BTN_pressed():
31
-	var new_nid = self._Story_Editor.create_node(self._did, "line")
32
-	var new_line_node = self._LineNode.instance()
33
-	new_line_node.offset += self._Graph.scroll_offset
34
-	new_line_node.set_nid(new_nid)
35
-	new_line_node.connect("erased", self, "_on_Node_erased")
36
-	new_line_node.connect("changed_offset", self, "_on_Node_changed_offset")
37
-	new_line_node.connect("text_changed", self, "_on_Node_text_changed")
38
-	new_line_node.connect("pressed_save", self, "_on_Node_pressed_save")
39
-	new_line_node.connect("pressed_load", self, "_on_Node_pressed_load")
40
-	new_line_node.connect("pressed_editor", self, "_on_Node_pressed_editor")
41
-	new_line_node.connect("changed_slots", self, "_on_Node_changed_slots")
42
-	new_line_node.connect("changed_size", self, "_on_Node_changed_size")
43
-	var slot_count = self._Story_Editor.get_node_property(self._did, new_nid, "slot_amount")
44
-	self._Story_Editor.set_node_property(self._did, new_nid, "rect_size", new_line_node.rect_size)
45
-	new_line_node.set_slot_amount(slot_count)
46
-	self._Graph.add_child(new_line_node)
47
-
48
-
49
-func _on_Back_BTN_pressed():
50
-	self.emit_signal("back_BTN_pressed")
51
-
52
-
53
-func _on_Close_BTN_pressed():
54
-	self.emit_signal("close_BTN_pressed")
55
-
56
-
57
-func _on_GraphEdit_connection_request(from, from_slot, to, to_slot):
58
-	self._Graph.connect_node(from, from_slot, to, to_slot)
59
-	var from_node = self._Graph.get_node(from)
60
-	var to_node = self._Graph.get_node(to)
61
-	var from_node_nid = from_node.get_nid()
62
-	var to_node_nid = to_node.get_nid()
63
-	self._Story_Editor.set_link(self._did, from_node_nid, from_slot, to_node_nid)
64
-
65
-
66
-func _on_GraphEdit_disconnection_request(from, from_slot, to, to_slot):
67
-	self._Graph.disconnect_node(from, from_slot, to, to_slot)
68
-	var from_node = self._Graph.get_node(from)
69
-	var from_node_nid = from_node.get_nid()
70
-	self._Story_Editor.erase_link(self._did, from_node_nid, from_slot)
71
-
72
-
73
-func _on_Load_Template_file_selected(filename):
74
-	var file_data = load(filename)
75
-	if not file_data.TYPE == "EXP_Dialog_Node_Template_editor":
76
-		return
77
-	
78
-	self._Target_Node.set_text(file_data.template)
79
-
80
-
81
-func _on_Node_changed_offset(nid, new_offset):
82
-	self._Story_Editor.set_node_property(self._did, nid, "graph_offset", new_offset)
83
-
84
-
85
-func _on_Node_changed_size(changed_node):
86
-	var changed_node_nid = changed_node.get_nid()
87
-	self._Story_Editor.set_node_property(self._did, changed_node_nid, "rect_size", changed_node.rect_size)
88
-
89
-
90
-func _on_Node_changed_slots(changed_node):
91
-	var changed_node_nid = changed_node.get_nid()
92
-	self._unlink_nid_from_story(changed_node_nid)
93
-	self._disconnect_all_from(changed_node)
94
-	self._Story_Editor.set_node_property(self._did, changed_node_nid, "slot_amount",
95
-		changed_node.get_slot_amount())
96
-
97
-
98
-func _on_Node_erased(deleted_node):
99
-	var deleted_nid = deleted_node.get_nid()
100
-	self._unlink_nid_from_story(deleted_nid)
101
-	self._Story_Editor.erase_node(self._did, deleted_nid)
102
-	self._disconnect_all_from(deleted_node)
103
-	deleted_node.queue_free()
104
-
105
-
106
-func _on_Node_pressed_editor(node):
107
-	self._Editor.set_target_node(node)
108
-	self._Editor.visible = true
109
-
110
-
111
-func _on_Node_pressed_load(node):
112
-	self._Target_Node = node
113
-	self._Load_Template.popup_centered_ratio(0.7)
114
-
115
-
116
-func _on_Node_pressed_save(node):
117
-	self._Target_Node = node
118
-	self._Save_Template_As.popup_centered_ratio(0.7)
119
-
120
-
121
-func _on_Node_text_changed(nid, new_text):
122
-	self._Story_Editor.set_node_property(self._did, nid, "text", new_text)
123
-
124
-
125
-func _on_Save_Template_As_file_selected(filename):
126
-	var save_file = _NodeTemplate.new()
127
-	save_file.template = self._Target_Node.get_text()
128
-	ResourceSaver.save(filename, save_file)
129
-
130
-
131
-func _on_Story_Editor_dialog_edit_pressed(story_editor, did : int):
132
-	self._Story_Editor = story_editor
133
-	self._did = did
134
-	self._Human_Readable_LBL.text = self._Story_Editor.get_dialog_property(self._did, "human_readable_description")
135
-	self._clear_nodes()
136
-	self._populate_graph()
137
-	self._link_node_connections()
138
-
139
-#Private Methods
140
-
141
-func _clear_nodes():
142
-	self._Graph.clear_connections()
143
-	var children = self._Graph.get_children()
144
-	for child in children:
145
-		if child is GraphNode:
146
-			child.free()
147
-
148
-
149
-func _disconnect_all_from(node):
150
-	var node_name = node.name
151
-	var connection_list = self._Graph.get_connection_list()
152
-	for connection in connection_list:
153
-		if connection["from"] == node.name or connection["to"] == node.name:
154
-			self._Graph.disconnect_node(connection["from"], connection["from_port"],
155
-				connection["to"], connection["to_port"])
156
-
157
-
158
-func _link_node_connections():
159
-	var node_IDs = self._Story_Editor.get_nids(self._did)
160
-	for nID in node_IDs:
161
-		var slots = self._Story_Editor.get_link_slots(self._did, nID)
162
-		for slot in slots:
163
-			var to_node_nid = self._Story_Editor.get_nid_link_from(self._did, nID, slot)
164
-			var to = "NID " + str(to_node_nid)
165
-			var from = "NID " + str(nID)
166
-			self._Graph.connect_node(from, slot, to, 0)
167
-
168
-
169
-func _populate_graph():
170
-	var node_IDs = self._Story_Editor.get_nids(self._did)
171
-	for nID in node_IDs:
172
-		var new_node : GraphNode
173
-		match self._Story_Editor.get_node_property(self._did, nID, "type"):
174
-			"line":
175
-				new_node = _LineNode.instance()
176
-				var slot_count = self._Story_Editor.get_node_property(self._did, nID, "slot_amount")
177
-				new_node.set_slot_amount(slot_count)
178
-				self._Graph.add_child(new_node)
179
-				new_node.connect("erased", self, "_on_Node_erased")
180
-				var new_text = self._Story_Editor.get_node_property(self._did, nID, "text")
181
-				var new_rect_size = self._Story_Editor.get_node_property(self._did, nID, "rect_size")
182
-				new_node.rect_size = new_rect_size
183
-				new_node.set_text(new_text)
184
-				new_node.connect("text_changed", self, "_on_Node_text_changed")
185
-				new_node.connect("pressed_save", self, "_on_Node_pressed_save")
186
-				new_node.connect("pressed_load", self, "_on_Node_pressed_load")
187
-				new_node.connect("pressed_editor", self, "_on_Node_pressed_editor")
188
-				new_node.connect("changed_slots", self, "_on_Node_changed_slots")
189
-				new_node.connect("changed_size", self, "_on_Node_changed_size")
190
-		
191
-		new_node.set_nid(nID)
192
-		new_node.offset = self._Story_Editor.get_node_property(self._did, nID, "graph_offset")
193
-		new_node.connect("changed_offset", self, "_on_Node_changed_offset")
194
-
195
-
196
-func _setup_dialogs():
197
-	self._Load_Template = EditorFileDialog.new()
198
-	self._Load_Template.mode = EditorFileDialog.MODE_OPEN_FILE
199
-	self._Load_Template.add_filter("*.res ; Template files")
200
-	self._Load_Template.resizable = true
201
-	self._Load_Template.access = EditorFileDialog.ACCESS_RESOURCES
202
-	self._Load_Template.current_dir = "res://"
203
-	self._Load_Template.connect("file_selected", self, "_on_Load_Template_file_selected")
204
-	self.add_child(self._Load_Template)
205
-	
206
-	self._Save_Template_As = EditorFileDialog.new()
207
-	self._Save_Template_As.mode = EditorFileDialog.MODE_SAVE_FILE
208
-	self._Save_Template_As.add_filter("*.res ; Template files")
209
-	self._Save_Template_As.resizable = true
210
-	self._Save_Template_As.access = EditorFileDialog.ACCESS_RESOURCES
211
-	self._Save_Template_As.current_dir = "res://"
212
-	self._Save_Template_As.connect("file_selected", self, "_on_Save_Template_As_file_selected")
213
-	self.add_child(self._Save_Template_As)
214
-
215
-
216
-func _unlink_nid_from_story(removed_nid):
217
-	self._Story_Editor.erase_all_links(self._did, removed_nid)
218
-	var nIDs = self._Story_Editor.get_nids(self._did)
219
-	for nID in nIDs:
220
-		var node_slots = self._Story_Editor.get_link_slots(self._did, nID)
221
-		for slot in node_slots:
222
-			var to_node_nid = self._Story_Editor.get_nid_link_from(self._did, nID, slot)
223
-			if to_node_nid == removed_nid:
224
-				self._Story_Editor.erase_link(self._did, nID, slot)

BIN
addons/EXP-System-Dialog/Images/de.png View File


+ 0
- 34
addons/EXP-System-Dialog/Images/de.png.import View File

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

BIN
addons/EXP-System-Dialog/Images/icon.png View File


+ 0
- 34
addons/EXP-System-Dialog/Images/icon.png.import View File

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

BIN
addons/EXP-System-Dialog/Images/se.png View File


+ 0
- 34
addons/EXP-System-Dialog/Images/se.png.import View File

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

+ 0
- 83
addons/EXP-System-Dialog/Reference_StoryReader/EXP_StoryReader.gd View File

@@ -1,83 +0,0 @@
1
-extends Reference
2
-
3
-var _story : Dictionary = {}
4
-var _names : Dictionary = {}
5
-
6
-
7
-func get_dids() -> Array:
8
-	return self._story.keys()
9
-
10
-
11
-func get_did_via_record_name(name : String) -> int:
12
-	assert(self._names.has(name))
13
-	return self._names[name]
14
-
15
-
16
-func get_nid_from_slot(did : int, nid : int, slot : int) -> int:
17
-	assert(self.has_did(did))
18
-	assert(self.has_nid(did, nid))
19
-	assert(self.has_slot(did, nid, slot))
20
-	return self._story[did]["nodes"][nid]["links"][slot]
21
-
22
-
23
-func get_nid_via_exact_text(did : int, query : String) -> int:
24
-	assert(self.has_did(did))
25
-	
26
-	for nid in self._story[did]["nodes"].keys():
27
-		if self._story[did]["nodes"][nid]["text"] == query:
28
-			return nid
29
-	return -1
30
-
31
-
32
-func get_nids(did : int) -> Array:
33
-	assert(self.has_did(did))
34
-	return self._story[did]["nodes"].keys()
35
-
36
-
37
-func get_slot_count(did : int, nid : int) -> int:
38
-	assert(self.has_did(did))
39
-	assert(self.has_nid(did, nid))
40
-	return self._story[did]["nodes"][nid]["links"].size()
41
-
42
-
43
-func get_slots(did : int, nid : int) -> Array:
44
-	assert(self.has_did(did))
45
-	assert(self.has_nid(did, nid))
46
-	return self._story[did]["nodes"][nid]["links"].keys()
47
-
48
-
49
-func get_text(did : int, nid : int) -> String:
50
-	assert(self.has_did(did))
51
-	assert(self.has_nid(did, nid))
52
-	return self._story[did]["nodes"][nid]["text"]
53
-
54
-
55
-func has_did(did : int) -> bool:
56
-	return self._story.has(did)
57
-
58
-
59
-func has_nid(did : int, nid : int) -> bool:
60
-	assert(self.has_did(did))
61
-	return self._story[did]["nodes"].has(nid)
62
-
63
-
64
-func has_record_name(name : String) -> bool:
65
-	return self._names.has(name)
66
-
67
-
68
-func has_slot(did: int, nid : int, slot : int) -> bool:
69
-	assert(self.has_did(did))
70
-	assert(self.has_nid(did, nid))
71
-	return self._story[did]["nodes"][nid]["links"].has(slot)
72
-
73
-
74
-func read(file):
75
-	if not "TYPE" in file:
76
-		print_debug("Story reader failed to open file: ", str(file.filename))
77
-		return
78
-	if not file.TYPE == "EXP_Baked_Story" or file.TYPE == "EXP_Story_editor":
79
-		print_debug("Story reader failed to open file: ", str(file.filename))
80
-		return
81
-	
82
-	self._story = file.story
83
-	self._names = file.names

+ 0
- 6
addons/EXP-System-Dialog/Resource_BakedStory/EXP_BakedStory.gd View File

@@ -1,6 +0,0 @@
1
-tool
2
-extends Resource
3
-
4
-export(String) var TYPE = "EXP_Baked_Story"
5
-export(Dictionary) var story : Dictionary
6
-export(Dictionary) var names : Dictionary

+ 0
- 9
addons/EXP-System-Dialog/Resource_EditorStory/EXP_EditorStory.gd View File

@@ -1,9 +0,0 @@
1
-tool
2
-extends Resource
3
-
4
-export(String) var TYPE = "EXP_Story_editor"
5
-
6
-export(Dictionary) var names : Dictionary
7
-export(Dictionary) var story : Dictionary
8
-export(Array) var available_dids : Array
9
-export(Array) var groups : Array

+ 0
- 6
addons/EXP-System-Dialog/Resource_NodeTemplate/EXP_NodeTemplate.gd View File

@@ -1,6 +0,0 @@
1
-tool
2
-extends Resource
3
-
4
-var TYPE = "EXP_Dialog_Node_Template_editor"
5
-
6
-export(String) var template

+ 0
- 109
addons/EXP-System-Dialog/Story Editor/Dialog Record/Dialog_Record.tscn View File

@@ -1,109 +0,0 @@
1
-[gd_scene load_steps=4 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Story Editor/Dialog Record/dialog_record.gd" type="Script" id=1]
4
-
5
-[sub_resource type="StyleBoxFlat" id=1]
6
-bg_color = Color( 0.6, 0.6, 0.6, 0 )
7
-border_color = Color( 0.8, 0.8, 0.8, 0 )
8
-shadow_color = Color( 0, 0, 0, 0 )
9
-
10
-[sub_resource type="StyleBoxFlat" id=2]
11
-bg_color = Color( 0.6, 0.6, 0.6, 0 )
12
-border_color = Color( 0.8, 0.8, 0.8, 0 )
13
-shadow_color = Color( 0, 0, 0, 0 )
14
-
15
-[node name="Dialog_Record" type="Control"]
16
-anchor_right = 1.0
17
-rect_min_size = Vector2( 0, 28 )
18
-script = ExtResource( 1 )
19
-__meta__ = {
20
-"_edit_use_anchors_": false
21
-}
22
-
23
-[node name="ColorRect" type="ColorRect" parent="."]
24
-anchor_right = 1.0
25
-anchor_bottom = 1.0
26
-rect_min_size = Vector2( 0, 24 )
27
-size_flags_horizontal = 3
28
-color = Color( 1, 1, 1, 0.12549 )
29
-__meta__ = {
30
-"_edit_use_anchors_": false
31
-}
32
-
33
-[node name="HBoxContainer" type="HBoxContainer" parent="ColorRect"]
34
-anchor_right = 1.0
35
-anchor_bottom = 1.0
36
-__meta__ = {
37
-"_edit_use_anchors_": false
38
-}
39
-
40
-[node name="CheckBox" type="CheckBox" parent="ColorRect/HBoxContainer"]
41
-margin_right = 24.0
42
-margin_bottom = 28.0
43
-
44
-[node name="DID_LBL" type="Label" parent="ColorRect/HBoxContainer"]
45
-margin_left = 28.0
46
-margin_top = 7.0
47
-margin_right = 85.0
48
-margin_bottom = 21.0
49
-text = "DID: 101"
50
-
51
-[node name="VSeparator" type="VSeparator" parent="ColorRect/HBoxContainer"]
52
-margin_left = 89.0
53
-margin_right = 93.0
54
-margin_bottom = 28.0
55
-
56
-[node name="Edit_BTN" type="Button" parent="ColorRect/HBoxContainer"]
57
-margin_left = 97.0
58
-margin_right = 138.0
59
-margin_bottom = 28.0
60
-hint_tooltip = "Edit this dialog record in the Dialog Editor."
61
-text = "EDIT"
62
-flat = true
63
-
64
-[node name="VSeparator4" type="VSeparator" parent="ColorRect/HBoxContainer"]
65
-margin_left = 142.0
66
-margin_right = 146.0
67
-margin_bottom = 28.0
68
-
69
-[node name="Name_BTN" type="Button" parent="ColorRect/HBoxContainer"]
70
-margin_left = 150.0
71
-margin_right = 200.0
72
-margin_bottom = 28.0
73
-hint_tooltip = "Edit this dialog record in the Dialog Editor."
74
-text = "NAME"
75
-flat = true
76
-
77
-[node name="VSeparator2" type="VSeparator" parent="ColorRect/HBoxContainer"]
78
-margin_left = 204.0
79
-margin_right = 208.0
80
-margin_bottom = 28.0
81
-
82
-[node name="Group_BTN" type="OptionButton" parent="ColorRect/HBoxContainer"]
83
-margin_left = 212.0
84
-margin_right = 274.0
85
-margin_bottom = 28.0
86
-hint_tooltip = "View groups applied to this dialog record."
87
-text = "TAGS"
88
-flat = true
89
-
90
-[node name="VSeparator3" type="VSeparator" parent="ColorRect/HBoxContainer"]
91
-margin_left = 278.0
92
-margin_right = 282.0
93
-margin_bottom = 28.0
94
-
95
-[node name="Human_Readable_LineEdit" type="LineEdit" parent="ColorRect/HBoxContainer"]
96
-margin_left = 286.0
97
-margin_right = 476.0
98
-margin_bottom = 28.0
99
-custom_styles/focus = SubResource( 1 )
100
-custom_styles/normal = SubResource( 2 )
101
-text = "Human Readable Description"
102
-expand_to_text_length = true
103
-context_menu_enabled = false
104
-[connection signal="toggled" from="ColorRect/HBoxContainer/CheckBox" to="." method="_on_CheckBox_toggled"]
105
-[connection signal="pressed" from="ColorRect/HBoxContainer/Edit_BTN" to="." method="_on_Edit_BTN_pressed"]
106
-[connection signal="pressed" from="ColorRect/HBoxContainer/Name_BTN" to="." method="_on_Name_BTN_pressed"]
107
-[connection signal="pressed" from="ColorRect/HBoxContainer/Group_BTN" to="." method="_on_Group_BTN_pressed"]
108
-[connection signal="focus_exited" from="ColorRect/HBoxContainer/Human_Readable_LineEdit" to="." method="_on_Human_Readable_LineEdit_focus_exited"]
109
-[connection signal="text_changed" from="ColorRect/HBoxContainer/Human_Readable_LineEdit" to="." method="_on_Human_Readable_LineEdit_text_changed"]

+ 0
- 91
addons/EXP-System-Dialog/Story Editor/Dialog Record/dialog_record.gd View File

@@ -1,91 +0,0 @@
1
-tool
2
-extends Control
3
-
4
-signal changed_human_readable_text(did, text)
5
-signal checked(this)
6
-signal edit_pressed(did)
7
-signal rename_pressed(this)
8
-signal unchecked(this)
9
-
10
-onready var _DID_LBL = self.get_node("ColorRect/HBoxContainer/DID_LBL")
11
-onready var _Human_Readable_LineEdit = self.get_node("ColorRect/HBoxContainer/Human_Readable_LineEdit")
12
-onready var _Group_List = self.get_node("ColorRect/HBoxContainer/Group_BTN")
13
-onready var _Name_BTN = self.get_node("ColorRect/HBoxContainer/Name_BTN")
14
-onready var _Select_CheckBox = self.get_node("ColorRect/HBoxContainer/CheckBox")
15
-
16
-var _did : int = -1
17
-var _Story_Editor
18
-
19
-#Virtual Methods
20
-
21
-func _ready():
22
-	self.update_human_readable_description("Human Readable Description")
23
-
24
-#Callback Methods
25
-
26
-func _on_CheckBox_toggled(button_pressed):
27
-	if button_pressed:
28
-		self.emit_signal("checked", self)
29
-	else:
30
-		self.emit_signal("unchecked", self)
31
-
32
-
33
-func _on_Edit_BTN_pressed():
34
-	self.emit_signal("edit_pressed", self._did)
35
-
36
-
37
-func _on_Group_BTN_pressed():
38
-	var groups = self._Story_Editor.dialog_get_groups(self._did)
39
-	self._Group_List.clear()
40
-	self._Group_List.text = "TAGS"
41
-	for group in groups:
42
-		self._Group_List.get_popup().add_item(group)
43
-	for idx in range(self._Group_List.get_item_count()):
44
-		self._Group_List.set_item_disabled(idx, true)
45
-
46
-
47
-func _on_Human_Readable_LineEdit_focus_exited():
48
-	self._Human_Readable_LineEdit.deselect()
49
-
50
-
51
-func _on_Human_Readable_LineEdit_text_changed(new_text):
52
-	self.emit_signal("changed_human_readable_text", self._did, new_text)
53
-
54
-
55
-func _on_Name_BTN_pressed():
56
-	emit_signal("rename_pressed", self)
57
-
58
-#Public Methods
59
-
60
-func check():
61
-	self._Select_CheckBox.pressed = true
62
-
63
-
64
-func get_did():
65
-	return self._did
66
-
67
-
68
-func get_record_name():
69
-	return self._Name_BTN.text
70
-
71
-
72
-func set_did(new_did : int):
73
-	self._did = new_did
74
-	self._DID_LBL.text = "DID: " + str(new_did)
75
-
76
-
77
-func set_record_name(rename : String):
78
-	self._Name_BTN.text = rename
79
-
80
-
81
-func set_story_editor(editor):
82
-	self._Story_Editor = editor
83
-
84
-
85
-func uncheck():
86
-	self._Select_CheckBox.pressed = false
87
-
88
-
89
-func update_human_readable_description(new_text):
90
-	self._Human_Readable_LineEdit.text = new_text
91
-	self.emit_signal("changed_human_readable_text", self._did, new_text)

+ 0
- 92
addons/EXP-System-Dialog/Story Editor/Rename Record Box/Rename_Record_Box.tscn View File

@@ -1,92 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Story Editor/Rename Record Box/rename_record_box.gd" type="Script" id=1]
4
-
5
-[node name="Record_Rename_Box" type="WindowDialog"]
6
-anchor_left = 0.5
7
-anchor_top = 0.5
8
-anchor_right = 0.5
9
-anchor_bottom = 0.5
10
-margin_left = -193.0
11
-margin_top = -64.0
12
-margin_right = 193.0
13
-margin_bottom = 52.0
14
-rect_min_size = Vector2( 386, 116 )
15
-size_flags_horizontal = 3
16
-size_flags_vertical = 3
17
-window_title = "Rename Dialog Record"
18
-script = ExtResource( 1 )
19
-__meta__ = {
20
-"_edit_use_anchors_": false
21
-}
22
-
23
-[node name="MarginContainer" type="MarginContainer" parent="."]
24
-anchor_right = 1.0
25
-anchor_bottom = 1.0
26
-margin_left = 8.0
27
-margin_top = 8.0
28
-margin_right = -8.0
29
-margin_bottom = -8.0
30
-size_flags_horizontal = 3
31
-size_flags_vertical = 3
32
-__meta__ = {
33
-"_edit_use_anchors_": false
34
-}
35
-
36
-[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
37
-margin_right = 370.0
38
-margin_bottom = 100.0
39
-size_flags_horizontal = 3
40
-size_flags_vertical = 3
41
-__meta__ = {
42
-"_edit_use_anchors_": false
43
-}
44
-
45
-[node name="Name_LBL" type="Label" parent="MarginContainer/VBoxContainer"]
46
-margin_right = 370.0
47
-margin_bottom = 14.0
48
-text = "Name:"
49
-
50
-[node name="Spacer2" type="Control" parent="MarginContainer/VBoxContainer"]
51
-margin_top = 18.0
52
-margin_right = 370.0
53
-margin_bottom = 22.0
54
-rect_min_size = Vector2( 0, 4 )
55
-
56
-[node name="Name_LineEdit" type="LineEdit" parent="MarginContainer/VBoxContainer"]
57
-margin_top = 26.0
58
-margin_right = 370.0
59
-margin_bottom = 50.0
60
-
61
-[node name="Spacer3" type="Control" parent="MarginContainer/VBoxContainer"]
62
-margin_top = 54.0
63
-margin_right = 370.0
64
-margin_bottom = 58.0
65
-rect_min_size = Vector2( 0, 4 )
66
-
67
-[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
68
-margin_top = 62.0
69
-margin_right = 370.0
70
-margin_bottom = 82.0
71
-alignment = 1
72
-
73
-[node name="Cancel_BTN" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
74
-margin_left = 106.0
75
-margin_right = 160.0
76
-margin_bottom = 20.0
77
-text = "Cancel"
78
-
79
-[node name="Spacer" type="Control" parent="MarginContainer/VBoxContainer/HBoxContainer"]
80
-margin_left = 164.0
81
-margin_right = 196.0
82
-margin_bottom = 20.0
83
-rect_min_size = Vector2( 32, 0 )
84
-
85
-[node name="Rename_BTN" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
86
-margin_left = 200.0
87
-margin_right = 264.0
88
-margin_bottom = 20.0
89
-text = "Rename"
90
-[connection signal="text_entered" from="MarginContainer/VBoxContainer/Name_LineEdit" to="." method="_on_Name_LineEdit_text_entered"]
91
-[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/Cancel_BTN" to="." method="_on_Cancel_BTN_pressed"]
92
-[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/Rename_BTN" to="." method="_on_Rename_BTN_pressed"]

+ 0
- 32
addons/EXP-System-Dialog/Story Editor/Rename Record Box/rename_record_box.gd View File

@@ -1,32 +0,0 @@
1
-tool
2
-extends WindowDialog
3
-
4
-signal rename_BTN_pressed(text)
5
-
6
-onready var _Name_LineEdit = self.get_node("MarginContainer/VBoxContainer/Name_LineEdit")
7
-
8
-var _Target_Record = null
9
-
10
-#Public Methods
11
-
12
-func get_target_record():
13
-	return self._Target_Record
14
-
15
-
16
-func set_target_record(record):
17
-	self._Target_Record = record
18
-	self._Name_LineEdit.text = record.get_record_name()
19
-
20
-#Callback Methods
21
-
22
-func _on_Cancel_BTN_pressed():
23
-	self.visible = false
24
-
25
-
26
-func _on_Rename_BTN_pressed():
27
-	self.visible = false
28
-	self.emit_signal("rename_BTN_pressed", self._Name_LineEdit.text)
29
-
30
-
31
-func _on_Name_LineEdit_text_entered(new_text):
32
-	self._on_Rename_BTN_pressed()

+ 0
- 268
addons/EXP-System-Dialog/Story Editor/Story_Editor.tscn View File

@@ -1,268 +0,0 @@
1
-[gd_scene load_steps=2 format=2]
2
-
3
-[ext_resource path="res://addons/EXP-System-Dialog/Story Editor/story_editor.gd" type="Script" id=1]
4
-
5
-[node name="Story_Editor" type="Control"]
6
-anchor_right = 1.0
7
-anchor_bottom = 1.0
8
-rect_min_size = Vector2( 0, 256 )
9
-script = ExtResource( 1 )
10
-__meta__ = {
11
-"_edit_use_anchors_": false
12
-}
13
-
14
-[node name="VBoxContainer" type="VBoxContainer" parent="."]
15
-anchor_right = 1.0
16
-anchor_bottom = 1.0
17
-__meta__ = {
18
-"_edit_use_anchors_": false
19
-}
20
-
21
-[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
22
-margin_right = 1024.0
23
-margin_bottom = 20.0
24
-
25
-[node name="Close_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
26
-margin_right = 47.0
27
-margin_bottom = 20.0
28
-text = "Close"
29
-
30
-[node name="VSeparator5" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
31
-margin_left = 51.0
32
-margin_right = 55.0
33
-margin_bottom = 20.0
34
-
35
-[node name="Story" type="MenuButton" parent="VBoxContainer/HBoxContainer"]
36
-margin_left = 59.0
37
-margin_right = 103.0
38
-margin_bottom = 20.0
39
-text = "Story"
40
-items = [ "New Story", null, 0, false, false, 0, 0, null, "", false, "Load Story", null, 0, false, false, 1, 0, null, "", false, "Save Story As", null, 0, false, false, 2, 0, null, "", false, "Bake Story As", null, 0, false, false, 3, 0, null, "", false, "Save CSV As", null, 0, false, false, 4, 0, null, "", false, "Load CSV", null, 0, false, false, 5, 0, null, "", false ]
41
-
42
-[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
43
-margin_left = 107.0
44
-margin_right = 111.0
45
-margin_bottom = 20.0
46
-
47
-[node name="Label2" type="Label" parent="VBoxContainer/HBoxContainer"]
48
-margin_left = 115.0
49
-margin_top = 3.0
50
-margin_right = 163.0
51
-margin_bottom = 17.0
52
-text = "Dialog: "
53
-
54
-[node name="Create_Dialog_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
55
-margin_left = 167.0
56
-margin_right = 220.0
57
-margin_bottom = 20.0
58
-hint_tooltip = "Create a new dialog record."
59
-text = "Create"
60
-
61
-[node name="Delete_Dialog_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
62
-margin_left = 224.0
63
-margin_right = 279.0
64
-margin_bottom = 20.0
65
-hint_tooltip = "Delete all checked dialog records."
66
-text = "Delete"
67
-
68
-[node name="Check_All_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
69
-margin_left = 283.0
70
-margin_right = 354.0
71
-margin_bottom = 20.0
72
-hint_tooltip = "Check all currently visible dialog records."
73
-text = "Check All"
74
-
75
-[node name="UnCheck_All_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
76
-margin_left = 358.0
77
-margin_right = 447.0
78
-margin_bottom = 20.0
79
-hint_tooltip = "Uncheck all currently visible dialog records."
80
-text = "UnCheck All"
81
-
82
-[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
83
-margin_left = 451.0
84
-margin_right = 455.0
85
-margin_bottom = 20.0
86
-
87
-[node name="Label3" type="Label" parent="VBoxContainer/HBoxContainer"]
88
-margin_left = 459.0
89
-margin_top = 3.0
90
-margin_right = 495.0
91
-margin_bottom = 17.0
92
-text = "Tags: "
93
-
94
-[node name="Group_Manager_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
95
-margin_left = 499.0
96
-margin_right = 590.0
97
-margin_bottom = 20.0
98
-hint_tooltip = "Toggles the Group Manager open and closed. Use the Group Manager to add and delete groups that can be applied to dialog records in this story project."
99
-toggle_mode = true
100
-text = "Tag Manager"
101
-
102
-[node name="VSeparator3" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
103
-margin_left = 594.0
104
-margin_right = 598.0
105
-margin_bottom = 20.0
106
-
107
-[node name="Apply_Group_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
108
-margin_left = 602.0
109
-margin_right = 650.0
110
-margin_bottom = 20.0
111
-hint_tooltip = "Apply the group selected in the Group selector menu to all checked dialog records."
112
-text = "Apply"
113
-
114
-[node name="Remove_Group_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
115
-margin_left = 654.0
116
-margin_right = 718.0
117
-margin_bottom = 20.0
118
-hint_tooltip = "Remove the group selected in the Group selector menu from all checked dialog records if the group is applied to them."
119
-text = "Remove"
120
-
121
-[node name="Group_Selector_BTN" type="OptionButton" parent="VBoxContainer/HBoxContainer"]
122
-margin_left = 722.0
123
-margin_right = 779.0
124
-margin_bottom = 20.0
125
-hint_tooltip = "Select a group to apply or remove from dialog records."
126
-text = "Tags"
127
-
128
-[node name="VSeparator4" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
129
-margin_left = 783.0
130
-margin_right = 787.0
131
-margin_bottom = 20.0
132
-
133
-[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
134
-margin_top = 24.0
135
-margin_right = 1024.0
136
-margin_bottom = 572.0
137
-size_flags_horizontal = 3
138
-size_flags_vertical = 3
139
-
140
-[node name="Panel" type="Panel" parent="VBoxContainer/HBoxContainer3"]
141
-margin_right = 1024.0
142
-margin_bottom = 548.0
143
-size_flags_horizontal = 3
144
-size_flags_vertical = 3
145
-
146
-[node name="VScrollBar" type="ScrollContainer" parent="VBoxContainer/HBoxContainer3/Panel"]
147
-anchor_right = 1.0
148
-anchor_bottom = 1.0
149
-rect_min_size = Vector2( 0, 128 )
150
-size_flags_vertical = 3
151
-__meta__ = {
152
-"_edit_use_anchors_": false
153
-}
154
-
155
-[node name="Dialog_Record_Root" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3/Panel/VScrollBar"]
156
-margin_right = 1024.0
157
-margin_bottom = 548.0
158
-rect_min_size = Vector2( 0, 128 )
159
-size_flags_horizontal = 3
160
-size_flags_vertical = 3
161
-__meta__ = {
162
-"_edit_use_anchors_": false
163
-}
164
-
165
-[node name="Group_Manager" type="VBoxContainer" parent="VBoxContainer/HBoxContainer3"]
166
-visible = false
167
-margin_left = 824.0
168
-margin_right = 1080.0
169
-margin_bottom = 716.0
170
-rect_min_size = Vector2( 256, 0 )
171
-__meta__ = {
172
-"_edit_use_anchors_": false
173
-}
174
-
175
-[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/HBoxContainer3/Group_Manager"]
176
-margin_right = 256.0
177
-margin_bottom = 24.0
178
-
179
-[node name="Add_Group_LineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer"]
180
-margin_right = 156.0
181
-margin_bottom = 24.0
182
-rect_min_size = Vector2( 128, 0 )
183
-size_flags_horizontal = 3
184
-
185
-[node name="Add_Group_BTN" type="Button" parent="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer"]
186
-margin_left = 160.0
187
-margin_right = 197.0
188
-margin_bottom = 24.0
189
-hint_tooltip = "Add a group to this story project."
190
-text = "Add"
191
-__meta__ = {
192
-"_edit_use_anchors_": false
193
-}
194
-
195
-[node name="Delete_Group_BTN" type="Button" parent="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer"]
196
-margin_left = 201.0
197
-margin_right = 256.0
198
-margin_bottom = 24.0
199
-hint_tooltip = "Remove the selected group from this story project."
200
-text = "Delete"
201
-
202
-[node name="Group_ItemList" type="ItemList" parent="VBoxContainer/HBoxContainer3/Group_Manager"]
203
-margin_top = 28.0
204
-margin_right = 256.0
205
-margin_bottom = 716.0
206
-size_flags_vertical = 3
207
-
208
-[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
209
-margin_top = 576.0
210
-margin_right = 1024.0
211
-margin_bottom = 600.0
212
-rect_min_size = Vector2( 0, 24 )
213
-
214
-[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer2"]
215
-margin_top = 5.0
216
-margin_right = 65.0
217
-margin_bottom = 19.0
218
-text = "Search by "
219
-
220
-[node name="Search_OptionButton" type="OptionButton" parent="VBoxContainer/HBoxContainer2"]
221
-margin_left = 69.0
222
-margin_right = 233.0
223
-margin_bottom = 24.0
224
-text = "Human Readable LBL"
225
-items = [ "Human Readable LBL", null, false, 0, null, "DID", null, false, 1, null ]
226
-selected = 0
227
-
228
-[node name="Search_LineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer2"]
229
-margin_left = 237.0
230
-margin_right = 493.0
231
-margin_bottom = 24.0
232
-rect_min_size = Vector2( 256, 0 )
233
-
234
-[node name="Filter_MenuButton" type="MenuButton" parent="VBoxContainer/HBoxContainer2"]
235
-margin_left = 497.0
236
-margin_right = 537.0
237
-margin_bottom = 24.0
238
-hint_tooltip = "Select the groups that appear listed in the story editor."
239
-keep_pressed_outside = true
240
-text = "Tags"
241
-flat = false
242
-items = [ "-No Tags-", null, 1, true, false, 0, 0, null, "", false ]
243
-
244
-[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer2"]
245
-margin_left = 541.0
246
-margin_right = 545.0
247
-margin_bottom = 24.0
248
-
249
-[node name="Filename_LBL" type="Label" parent="VBoxContainer/HBoxContainer2"]
250
-margin_left = 549.0
251
-margin_top = 5.0
252
-margin_right = 640.0
253
-margin_bottom = 19.0
254
-text = "Unsaved Story"
255
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Close_BTN" to="." method="_on_Close_BTN_pressed"]
256
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Create_Dialog_BTN" to="." method="_on_Create_Dialog_BTN_pressed"]
257
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Delete_Dialog_BTN" to="." method="_on_Delete_Dialog_BTN_pressed"]
258
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Check_All_BTN" to="." method="_on_Check_All_BTN_pressed"]
259
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/UnCheck_All_BTN" to="." method="_on_Uncheck_All_BTN_pressed"]
260
-[connection signal="toggled" from="VBoxContainer/HBoxContainer/Group_Manager_BTN" to="." method="_on_Group_Manager_BTN_toggled"]
261
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Apply_Group_BTN" to="." method="_on_Apply_Group_BTN_pressed"]
262
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Remove_Group_BTN" to="." method="_on_Remove_Group_BTN_pressed"]
263
-[connection signal="pressed" from="VBoxContainer/HBoxContainer/Group_Selector_BTN" to="." method="_on_Group_Selector_BTN_pressed"]
264
-[connection signal="text_entered" from="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer/Add_Group_LineEdit" to="." method="_on_Add_Group_LineEdit_text_entered"]
265
-[connection signal="pressed" from="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer/Add_Group_BTN" to="." method="_on_Add_Group_BTN_pressed"]
266
-[connection signal="pressed" from="VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer/Delete_Group_BTN" to="." method="_on_Delete_Group_BTN_pressed"]
267
-[connection signal="item_selected" from="VBoxContainer/HBoxContainer2/Search_OptionButton" to="." method="_on_Search_OptionButton_item_selected"]
268
-[connection signal="text_changed" from="VBoxContainer/HBoxContainer2/Search_LineEdit" to="." method="_on_Search_LineEdit_text_changed"]

+ 0
- 753
addons/EXP-System-Dialog/Story Editor/story_editor.gd View File

@@ -1,753 +0,0 @@
1
-tool
2
-extends Control
3
-
4
-signal changed_story
5
-signal close_pressed
6
-signal dialog_edit_pressed(story, did)
7
-
8
-onready var _Dialog_Record_Root = self.get_node("VBoxContainer/HBoxContainer3/Panel/VScrollBar/Dialog_Record_Root")
9
-onready var _Dir = Directory.new()
10
-onready var _Filename_LBL = self.get_node("VBoxContainer/HBoxContainer2/Filename_LBL")
11
-onready var _Filter_Menu = self.get_node("VBoxContainer/HBoxContainer2/Filter_MenuButton")
12
-onready var _Group_List = self.get_node("VBoxContainer/HBoxContainer3/Group_Manager/Group_ItemList")
13
-onready var _Group_Manager_Panel = self.get_node("VBoxContainer/HBoxContainer3/Group_Manager")
14
-onready var _Group_Selector = self.get_node("VBoxContainer/HBoxContainer/Group_Selector_BTN")
15
-onready var _New_Group_LineEdit = self.get_node("VBoxContainer/HBoxContainer3/Group_Manager/HBoxContainer/Add_Group_LineEdit")
16
-onready var _Search_LineEdit = self.get_node("VBoxContainer/HBoxContainer2/Search_LineEdit")
17
-onready var _Search_Option_BTN = self.get_node("VBoxContainer/HBoxContainer2/Search_OptionButton")
18
-onready var _Story_Menu = self.get_node("VBoxContainer/HBoxContainer/Story")
19
-
20
-var _Dialog_Record = preload("res://addons/EXP-System-Dialog/Story Editor/Dialog Record/Dialog_Record.tscn")
21
-var _EXP_Baked_Story = preload("res://addons/EXP-System-Dialog/Resource_BakedStory/EXP_BakedStory.gd")
22
-var _EXP_Story = preload("res://addons/EXP-System-Dialog/Resource_EditorStory/EXP_EditorStory.gd")
23
-var _Record_Rename_Box_TSCN = preload("res://addons/EXP-System-Dialog/Story Editor/Rename Record Box/Rename_Record_Box.tscn")
24
-
25
-var _available_dids : Array
26
-var _Bake_Story_As : EditorFileDialog
27
-var _checked_dialogs : Array = []
28
-var _groups : Array
29
-var _Load_CSV : EditorFileDialog
30
-var _Load_Story : EditorFileDialog
31
-var _record_names : Dictionary
32
-var _Record_Rename_Box
33
-var _Save_CSV_As : EditorFileDialog
34
-var _Save_Story_As : EditorFileDialog
35
-var _story : Dictionary
36
-
37
-#Virtual Methods
38
-
39
-func _ready():
40
-	self._create_rename_box()
41
-	self._populate_story_menu()
42
-	self._setup_dialogs()
43
-	self._Filter_Menu.get_popup().connect("index_pressed", self, "_on_Filter_Menu_index_pressed")
44
-	self._Filter_Menu.get_popup().hide_on_checkable_item_selection = false
45
-	self._populate_filter_menu()
46
-	self._populate_searchby_menu()
47
-
48
-#Callback Methods
49
-
50
-func _on_Add_Group_BTN_pressed():
51
-	self._add_group()
52
-
53
-
54
-func _on_Add_Group_LineEdit_text_entered(new_text):
55
-	self._add_group()
56
-
57
-
58
-func _on_Apply_Group_BTN_pressed():
59
-	var id = self._Group_Selector.get_selected_id()
60
-	if id == -1:
61
-		return
62
-	
63
-	var idx = self._Group_Selector.get_item_index(id)
64
-	var group = self._Group_Selector.get_popup().get_item_text(idx)
65
-	for record in self._checked_dialogs.duplicate():
66
-		var did = record.get_did()
67
-		self._dialog_apply_group(did, group)
68
-		record.uncheck()
69
-	self.emit_signal("changed_story")
70
-
71
-
72
-func _on_Bake_Story_As_file_selected(filename : String):
73
-	self._bake_data_to(filename)
74
-
75
-
76
-func _on_Bake_Story_BTN_pressed():
77
-	self._Bake_Story_As.popup_centered_ratio(0.7)
78
-
79
-
80
-func _on_Check_All_BTN_pressed():
81
-	var records = self._Dialog_Record_Root.get_children()
82
-	for record in records:
83
-		if record.visible:
84
-			record.check()
85
-
86
-
87
-func _on_Close_BTN_pressed():
88
-	self.emit_signal("close_pressed")
89
-
90
-
91
-func _on_Create_Dialog_BTN_pressed():
92
-	self._create_dialog_record()
93
-
94
-
95
-func _on_Delete_Dialog_BTN_pressed():
96
-	self._delete_checked_dialogs()
97
-
98
-
99
-func _on_Delete_Group_BTN_pressed():
100
-	var idxs = self._Group_List.get_selected_items()
101
-	var group
102
-	for idx in idxs:
103
-		group = self._Group_List.get_item_text(idx)
104
-		self._Group_List.remove_item(idx)
105
-		self._delete_group(group)
106
-	self._populate_group_selector()
107
-	self._populate_filter_menu()
108
-	
109
-
110
-func _on_Dialog_changed_human_readable_text(did : int, new_text : String):
111
-	self.set_dialog_property(did, "human_readable_description", new_text)
112
-	self.emit_signal("changed_story")
113
-
114
-
115
-func _on_Dialog_checked(dialog):
116
-	self._checked_dialogs.push_front(dialog)
117
-
118
-
119
-func _on_Dialog_edit_pressed(did : int):
120
-	self.emit_signal("dialog_edit_pressed", self, did)
121
-
122
-
123
-func _on_Dialog_unchecked(dialog):
124
-	self._checked_dialogs.erase(dialog)
125
-
126
-
127
-func _on_Filter_Menu_index_pressed(idx):
128
-	var checked = self._Filter_Menu.get_popup().is_item_checked(idx)
129
-	if not checked:
130
-		self._Filter_Menu.get_popup().set_item_checked(idx, true)
131
-	else:
132
-		self._Filter_Menu.get_popup().set_item_checked(idx, false)
133
-	self._update_filter()
134
-
135
-
136
-func _on_Group_Manager_BTN_toggled(button_pressed : bool):
137
-	if button_pressed:
138
-		self._Group_Manager_Panel.visible = true
139
-	else:
140
-		self._Group_Manager_Panel.visible = false
141
-
142
-
143
-func _on_Group_Selector_BTN_pressed():
144
-	self._populate_group_selector()
145
-
146
-
147
-func _on_Load_CSV_BTN_pressed():
148
-	self._Load_CSV.popup_centered_ratio(0.7)
149
-
150
-
151
-func _on_Load_CSV_file_selected(filepath : String):
152
-	var csv_file = File.new()
153
-	var status = csv_file.open(filepath, File.READ)
154
-	
155
-	if not status == OK:
156
-		print_debug("EXP_Story_Editor: Error loading file \"" + filepath + "\".")
157
-		return
158
-	
159
-	csv_file.get_csv_line()
160
-	
161
-	while not csv_file.eof_reached():
162
-		var line = csv_file.get_csv_line()
163
-		
164
-		if line.empty():
165
-			continue
166
-		
167
-		var did = int(line[0])
168
-		var nid = int(line[1])
169
-		var dialog = String(line[2])
170
-		
171
-		if not self._story.has(did):
172
-			continue