Intial commit
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
source_md5="3cf24f316c8d5727c99795f5d1714ae9"
|
||||
dest_md5="e79d943d17bbbb11393065e65e153ef0"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="65f893ad3fbb7d1b71121b4f8198645f"
|
||||
dest_md5="4592362844e0844a97ab67c73505a728"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="f5e89b78f48d3777042d2d9c3bd11093"
|
||||
dest_md5="e2991fb05ebd1cab6f9aee97129f8e7b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="fb3995b155512a689a0ba6be9b42e018"
|
||||
dest_md5="7c58a01ac5bd2b2a913ced328423ee6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="60e8b5d393dc465aea26c876b576dc61"
|
||||
dest_md5="7c58a01ac5bd2b2a913ced328423ee6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="d21a98c9c954889b2be9cb9480270f6c"
|
||||
dest_md5="8250b881fa1ebafede8150c3f28e28ea"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="6eb3903e82cda586224ce3c9c5ff40da"
|
||||
dest_md5="7c58a01ac5bd2b2a913ced328423ee6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="81c6d4f0d2881b13878ac3be34208bf0"
|
||||
dest_md5="a9da90b306f1882e4e186ea48c3ca6a7"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="b1d6932b616e2e9374e99abcb1f1463f"
|
||||
dest_md5="7c58a01ac5bd2b2a913ced328423ee6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="1b789165ff899c0b22369aaa89d5c47d"
|
||||
dest_md5="4819cd8fd0bc94e219fb0f6286bc4966"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="498238eefc5d435db513c9154102a19a"
|
||||
dest_md5="945c1e0ce4e4a8b67de3fca31c7f58fb"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="ff8aaa595a93dcf41d38c95891c7b66f"
|
||||
dest_md5="a6eee6ca0d51a4c3561c612ef2078b84"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="6163be0d08b0b059797d663c86c55a28"
|
||||
dest_md5="7c58a01ac5bd2b2a913ced328423ee6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="e8dabe73b13a84d293485b937c80f448"
|
||||
dest_md5="4d425793877e102c4abd32ff8888a949"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="0f187f924d66394184e7b3e6c957fb8c"
|
||||
dest_md5="c9bfe92d419f5078052bb89139a81b80"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="8aef6de8412026e94480cc71d8d055b6"
|
||||
dest_md5="f536ce724bbfd6d3eec9c9b681d8bd87"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="9d92358506b2f630f49d7186a984dda0"
|
||||
dest_md5="4d5bf56017f00adbc80e9bf5a14a9f50"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="08fdfe746696263d9157f46fbf6bcae3"
|
||||
dest_md5="663720fe7a6ed76fff5d90489304ad6b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="4ff64b42a338ac9011ac2780dac74ebe"
|
||||
dest_md5="0401b34431c28d6655cca2f6c66a187c"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="d0e2434e68cff19d6181dadf78b59476"
|
||||
dest_md5="4aed22f57f481bdedf014fc66461f2fa"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
|
||||
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="b3201b4a918ebdf71950def66ed04a26"
|
||||
dest_md5="6933bf8594f7d4f42a6f76b544d7c1f1"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="22ed25163315999b4a8fa6e0da259678"
|
||||
dest_md5="a57c4ce258f6040d4351e13ab3edccc9"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="597fbe9ccf6ea4d6483499e0cf0b03d0"
|
||||
dest_md5="44096b06df43545f31758f2c690ba4dd"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="6f3e7e42643abce347b394793b874e42"
|
||||
dest_md5="0f4e8768ca6ad5fc51ce63901809fe3e"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="e66b0871c7518f20d3c48c769960042f"
|
||||
dest_md5="ad0afd585fee97559c650d4a772736de"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="e2e68243dd9cef72d87b59c5a22d69dc"
|
||||
dest_md5="4eff7f79f4ab2f0bcc59fef50f7b3a14"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="b5e1af5f91a15a6192816d6ce5637421"
|
||||
dest_md5="ebad3beb99af472070b890b98a0df97e"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="d11fe17c538278732c370ff9a9299c13"
|
||||
dest_md5="518d32294d74c6b89d656e11ba60fff3"
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="53be14e4ad2f67df62927ebe16450b07"
|
||||
dest_md5="6d3a87776838f14ee876321be0a815b3"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="4a4e86688ea9e233c2a97d2091f91210"
|
||||
dest_md5="f46730c502307e961aea5b1794b64187"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="b39186c57feb6aaf1ad83b21f76c0bc0"
|
||||
dest_md5="9f65e84e6228e534c90c26186cdbac2f"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="41d8c79b5c539a2acf771607432eee6f"
|
||||
dest_md5="407f96bf098d799f4e6dd801afb37e68"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="303f11d3124d1c4e7f84eab94f2eec4e"
|
||||
dest_md5="c435ad0f5644e639bccd3d8ca358885b"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="46923f78324d6e9a8e0e4a863d2d42b1"
|
||||
dest_md5="c9e1f79e69e3f2f812c0be531478bb8e"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="62170d933feb1791d33e1fc234209ff0"
|
||||
dest_md5="841cfe9c8cca9b353975fdeca4a6818d"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="ae3bdb1e531d0d500f6d21de544b2067"
|
||||
dest_md5="8182b7555a30f5839165eafcca9acd9e"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="508339a6418ddd3a0049439743246daf"
|
||||
dest_md5="406b0df125d9b3ddad372c1756a707be"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="dd34a61f0c64a8b28fbc90958cefa569"
|
||||
dest_md5="5d38a4263fce6ada9174911d6983e089"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="d0f745eab525332d8bf1664282c7588b"
|
||||
dest_md5="6d618e905102503651994c62238c44d0"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="3f9f96bd8fedb148b7290a23ce498f9e"
|
||||
dest_md5="79058549fdc5214182993096ff2d5289"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="3f9f96bd8fedb148b7290a23ce498f9e"
|
||||
dest_md5="79058549fdc5214182993096ff2d5289"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="5abe5405feeddb56fee2a97ddfc92f43"
|
||||
dest_md5="883c4bca793e696a0f060011aca98363"
|
||||
|
Binary file not shown.
@ -0,0 +1,76 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd" type="Script" id=1]
|
||||
|
||||
[node name="Dialog_Editor" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_min_size = Vector2( 0, 256 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="Close_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_right = 47.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Close the Dialog Editor."
|
||||
text = "Close"
|
||||
|
||||
[node name="Back_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_left = 51.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Return to the Story Editor."
|
||||
text = "Back"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_left = 97.0
|
||||
margin_right = 101.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="Add_Node_BTN" type="Button" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_left = 105.0
|
||||
margin_right = 180.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Add a new node to the graph."
|
||||
text = "Add Node"
|
||||
|
||||
[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_left = 184.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="Human_Readable_LBL" type="Label" parent="VBoxContainer/VBoxContainer"]
|
||||
margin_left = 192.0
|
||||
margin_top = 3.0
|
||||
margin_right = 378.0
|
||||
margin_bottom = 17.0
|
||||
text = "Human Readable Description"
|
||||
|
||||
[node name="GraphEdit" type="GraphEdit" parent="VBoxContainer"]
|
||||
margin_top = 24.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
right_disconnects = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="pressed" from="VBoxContainer/VBoxContainer/Close_BTN" to="." method="_on_Close_BTN_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/VBoxContainer/Back_BTN" to="." method="_on_Back_BTN_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/VBoxContainer/Add_Node_BTN" to="." method="_on_Add_Node_BTN_pressed"]
|
||||
[connection signal="connection_request" from="VBoxContainer/GraphEdit" to="." method="_on_GraphEdit_connection_request"]
|
||||
[connection signal="disconnection_request" from="VBoxContainer/GraphEdit" to="." method="_on_GraphEdit_disconnection_request"]
|
@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Editor/editor.gd" type="Script" id=1]
|
||||
|
||||
[node name="WindowDialog" type="WindowDialog"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -540.0
|
||||
margin_top = -384.0
|
||||
margin_right = 540.0
|
||||
margin_bottom = 384.0
|
||||
window_title = "Node Editor"
|
||||
resizable = true
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 13.0
|
||||
margin_top = 13.0
|
||||
margin_right = -13.0
|
||||
margin_bottom = -13.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextEdit" type="TextEdit" parent="VBoxContainer"]
|
||||
margin_right = 1054.0
|
||||
margin_bottom = 718.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
smooth_scrolling = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="OK_BTN" type="Button" parent="VBoxContainer"]
|
||||
margin_left = 503.0
|
||||
margin_top = 722.0
|
||||
margin_right = 550.0
|
||||
margin_bottom = 742.0
|
||||
hint_tooltip = "Close the node editor."
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 0
|
||||
text = "Close"
|
||||
[connection signal="text_changed" from="VBoxContainer/TextEdit" to="." method="_on_TextEdit_text_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/OK_BTN" to="." method="_on_OK_BTN_pressed"]
|
@ -0,0 +1,21 @@
|
||||
tool
|
||||
extends WindowDialog
|
||||
|
||||
onready var _Text_Editor = self.get_node("VBoxContainer/TextEdit")
|
||||
|
||||
var _Target_Node
|
||||
|
||||
#Public Methods
|
||||
|
||||
func set_target_node(node):
|
||||
self._Target_Node = node
|
||||
self._Text_Editor.text = node.get_text()
|
||||
|
||||
#Callback Methods
|
||||
|
||||
func _on_OK_BTN_pressed():
|
||||
self.visible = false
|
||||
|
||||
|
||||
func _on_TextEdit_text_changed():
|
||||
self._Target_Node.set_text(self._Text_Editor.text)
|
@ -0,0 +1,111 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/line_node.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg" type="Texture" id=2]
|
||||
|
||||
|
||||
[node name="Line" type="GraphNode"]
|
||||
margin_right = 324.0
|
||||
margin_bottom = 137.0
|
||||
rect_min_size = Vector2( 324, 137 )
|
||||
title = "Line"
|
||||
offset = Vector2( 40, 40 )
|
||||
show_close = true
|
||||
resizable = true
|
||||
slot/0/left_enabled = true
|
||||
slot/0/left_type = 0
|
||||
slot/0/left_color = Color( 1, 1, 1, 1 )
|
||||
slot/0/right_enabled = true
|
||||
slot/0/right_type = 0
|
||||
slot/0/right_color = Color( 1, 1, 1, 1 )
|
||||
slot/1/left_enabled = false
|
||||
slot/1/left_type = 0
|
||||
slot/1/left_color = Color( 1, 1, 1, 1 )
|
||||
slot/1/right_enabled = false
|
||||
slot/1/right_type = 0
|
||||
slot/1/right_color = Color( 1, 1, 1, 1 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 16.0
|
||||
margin_top = 39.0
|
||||
margin_right = 380.0
|
||||
margin_bottom = 131.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_right = 364.0
|
||||
margin_bottom = 64.0
|
||||
|
||||
[node name="TextEdit" type="TextEdit" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_right = 328.0
|
||||
margin_bottom = 64.0
|
||||
rect_min_size = Vector2( 256, 64 )
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
smooth_scrolling = true
|
||||
|
||||
[node name="Editor_BTN" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 332.0
|
||||
margin_right = 364.0
|
||||
margin_bottom = 64.0
|
||||
rect_min_size = Vector2( 32, 0 )
|
||||
hint_tooltip = "Expand this node's text editor."
|
||||
icon = ExtResource( 2 )
|
||||
expand_icon = true
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 68.0
|
||||
margin_right = 364.0
|
||||
margin_bottom = 92.0
|
||||
alignment = 1
|
||||
|
||||
[node name="Save_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_right = 125.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Save the current text as a template that can quickly loaded into new nodes."
|
||||
text = "Save Template As"
|
||||
|
||||
[node name="Load_BTN" type="Button" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 129.0
|
||||
margin_right = 235.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Load a template from file."
|
||||
text = "Load Template"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 239.0
|
||||
margin_right = 243.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="Link_LBL" type="Label" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 247.0
|
||||
margin_top = 5.0
|
||||
margin_right = 286.0
|
||||
margin_bottom = 19.0
|
||||
text = "Slots: "
|
||||
|
||||
[node name="Link_SpinBox" type="SpinBox" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 290.0
|
||||
margin_right = 364.0
|
||||
margin_bottom = 24.0
|
||||
hint_tooltip = "Change the number of output slots on this node."
|
||||
min_value = 1.0
|
||||
value = 1.0
|
||||
rounded = true
|
||||
allow_greater = true
|
||||
[connection signal="close_request" from="." to="." method="_on_Line_close_request"]
|
||||
[connection signal="offset_changed" from="." to="." method="_on_Line_offset_changed"]
|
||||
[connection signal="resize_request" from="." to="." method="_on_Line_resize_request"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer2/TextEdit" to="." method="_on_TextEdit_text_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/Editor_BTN" to="." method="_on_Editor_BTN_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Save_BTN" to="." method="_on_Save_BTN_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Load_BTN" to="." method="_on_Load_BTN_pressed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/HBoxContainer/Link_SpinBox" to="." method="_on_Link_SpinBox_value_changed"]
|
@ -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>
|
After Width: | Height: | Size: 388 B |
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon_distraction_free.svg-5120bf5545890a3868c1108c903f7cd9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/icon_distraction_free.svg"
|
||||
dest_files=[ "res://.import/icon_distraction_free.svg-5120bf5545890a3868c1108c903f7cd9.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -0,0 +1,114 @@
|
||||
tool
|
||||
extends GraphNode
|
||||
|
||||
signal changed_offset(nid, vec2)
|
||||
signal changed_size(this)
|
||||
signal changed_slots(this)
|
||||
signal erased(this)
|
||||
signal pressed_editor(this)
|
||||
signal pressed_load(this)
|
||||
signal pressed_save(this)
|
||||
signal text_changed(nid, new_text)
|
||||
|
||||
onready var _Link_SpinBox = self.get_node("VBoxContainer/HBoxContainer/Link_SpinBox")
|
||||
onready var _Text_Editor = self.get_node("VBoxContainer/HBoxContainer2/TextEdit")
|
||||
|
||||
var _nid : int = 0
|
||||
var _slot_amount : int = 1
|
||||
|
||||
#Virtual Methods
|
||||
|
||||
func _ready():
|
||||
self._update_slots()
|
||||
|
||||
#Callback Methods
|
||||
|
||||
func _on_Editor_BTN_pressed():
|
||||
self.emit_signal("pressed_editor", self)
|
||||
|
||||
|
||||
func _on_Line_close_request():
|
||||
self.emit_signal("erased", self)
|
||||
|
||||
|
||||
func _on_Line_offset_changed():
|
||||
self.emit_signal("changed_offset", self._nid, self.offset)
|
||||
|
||||
|
||||
func _on_Line_resize_request(new_minsize):
|
||||
self.rect_size = new_minsize
|
||||
self.emit_signal("changed_size", self)
|
||||
|
||||
|
||||
func _on_Link_SpinBox_value_changed(value):
|
||||
self._slot_amount = int(self._Link_SpinBox.value)
|
||||
self._update_slots()
|
||||
self.emit_signal("changed_slots", self)
|
||||
|
||||
|
||||
func _on_Load_BTN_pressed():
|
||||
self.emit_signal("pressed_load", self)
|
||||
|
||||
|
||||
func _on_Save_BTN_pressed():
|
||||
self.emit_signal("pressed_save", self)
|
||||
|
||||
|
||||
func _on_TextEdit_text_changed():
|
||||
self.emit_signal("text_changed", self._nid, self._Text_Editor.text)
|
||||
|
||||
#Public Methods
|
||||
|
||||
func get_nid() -> int:
|
||||
return self._nid
|
||||
|
||||
|
||||
func get_slot_amount() -> int:
|
||||
return self._slot_amount
|
||||
|
||||
|
||||
func get_text() -> String:
|
||||
return self._Text_Editor.text
|
||||
|
||||
|
||||
func set_nid(new_nid):
|
||||
self._nid = new_nid
|
||||
var new_name = "NID " + str(new_nid)
|
||||
self.title = new_name
|
||||
self.name = new_name
|
||||
|
||||
|
||||
func set_slot_amount(new_amount : int):
|
||||
self._slot_amount = new_amount
|
||||
|
||||
|
||||
func set_text(new_text : String):
|
||||
self._Text_Editor.text = new_text
|
||||
self.emit_signal("text_changed", self._nid, new_text)
|
||||
|
||||
#Private Methods
|
||||
|
||||
func _clear_link_labels():
|
||||
var children = self.get_children()
|
||||
for child in children:
|
||||
if child is Label:
|
||||
child.free()
|
||||
|
||||
|
||||
func _update_slots():
|
||||
self.clear_all_slots()
|
||||
self._clear_link_labels()
|
||||
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)
|
||||
var base_link_label = Label.new()
|
||||
base_link_label.text = "0"
|
||||
base_link_label.align = Label.ALIGN_RIGHT
|
||||
self.add_child(base_link_label)
|
||||
self.move_child(base_link_label, 0)
|
||||
var last_output_link_label = base_link_label
|
||||
for slot in range(1, self._slot_amount):
|
||||
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)
|
||||
var output_link_label = Label.new()
|
||||
output_link_label.text = str(slot)
|
||||
output_link_label.align = Label.ALIGN_RIGHT
|
||||
self.add_child_below_node(last_output_link_label, output_link_label)
|
||||
last_output_link_label = output_link_label
|
224
client/addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd
Normal file
224
client/addons/EXP-System-Dialog/Dialog Editor/dialog_editor.gd
Normal file
@ -0,0 +1,224 @@
|
||||
tool
|
||||
extends Control
|
||||
|
||||
signal back_BTN_pressed
|
||||
signal close_BTN_pressed
|
||||
|
||||
onready var _Graph = self.get_node("VBoxContainer/GraphEdit")
|
||||
onready var _Human_Readable_LBL = self.get_node("VBoxContainer/VBoxContainer/Human_Readable_LBL")
|
||||
|
||||
var _Editor_TSCN = preload("res://addons/EXP-System-Dialog/Dialog Editor/Editor/Editor.tscn")
|
||||
var _LineNode = preload("res://addons/EXP-System-Dialog/Dialog Editor/Nodes/Line/Line_Node.tscn")
|
||||
var _NodeTemplate= preload("res://addons/EXP-System-Dialog/Resource_NodeTemplate/EXP_NodeTemplate.gd")
|
||||
|
||||
var _did : int = -1
|
||||
var _Editor
|
||||
var _Load_Template : EditorFileDialog
|
||||
var _Save_Template_As : EditorFileDialog
|
||||
var _Story_Editor
|
||||
var _Target_Node
|
||||
|
||||
#Virtual Methods
|
||||
|
||||
func _ready():
|
||||
self._setup_dialogs()
|
||||
self._Editor = _Editor_TSCN.instance()
|
||||
self.add_child(self._Editor)
|
||||
|
||||
#Callback Methods
|
||||
|
||||
func _on_Add_Node_BTN_pressed():
|
||||
var new_nid = self._Story_Editor.create_node(self._did, "line")
|
||||
var new_line_node = self._LineNode.instance()
|
||||
new_line_node.offset += self._Graph.scroll_offset
|
||||
new_line_node.set_nid(new_nid)
|
||||
new_line_node.connect("erased", self, "_on_Node_erased")
|
||||
new_line_node.connect("changed_offset", self, "_on_Node_changed_offset")
|
||||
new_line_node.connect("text_changed", self, "_on_Node_text_changed")
|
||||
new_line_node.connect("pressed_save", self, "_on_Node_pressed_save")
|
||||
new_line_node.connect("pressed_load", self, "_on_Node_pressed_load")
|
||||
new_line_node.connect("pressed_editor", self, "_on_Node_pressed_editor")
|
||||
new_line_node.connect("changed_slots", self, "_on_Node_changed_slots")
|
||||
new_line_node.connect("changed_size", self, "_on_Node_changed_size")
|
||||
var slot_count = self._Story_Editor.get_node_property(self._did, new_nid, "slot_amount")
|
||||
self._Story_Editor.set_node_property(self._did, new_nid, "rect_size", new_line_node.rect_size)
|
||||
new_line_node.set_slot_amount(slot_count)
|
||||
self._Graph.add_child(new_line_node)
|
||||
|
||||
|
||||
func _on_Back_BTN_pressed():
|
||||
self.emit_signal("back_BTN_pressed")
|
||||
|
||||
|
||||
func _on_Close_BTN_pressed():
|
||||
self.emit_signal("close_BTN_pressed")
|
||||
|
||||
|
||||
func _on_GraphEdit_connection_request(from, from_slot, to, to_slot):
|
||||
self._Graph.connect_node(from, from_slot, to, to_slot)
|
||||
var from_node = self._Graph.get_node(from)
|
||||
var to_node = self._Graph.get_node(to)
|
||||
var from_node_nid = from_node.get_nid()
|
||||
var to_node_nid = to_node.get_nid()
|
||||
self._Story_Editor.set_link(self._did, from_node_nid, from_slot, to_node_nid)
|
||||
|
||||
|
||||
func _on_GraphEdit_disconnection_request(from, from_slot, to, to_slot):
|
||||
self._Graph.disconnect_node(from, from_slot, to, to_slot)
|
||||
var from_node = self._Graph.get_node(from)
|
||||
var from_node_nid = from_node.get_nid()
|
||||
self._Story_Editor.erase_link(self._did, from_node_nid, from_slot)
|
||||
|
||||
|
||||
func _on_Load_Template_file_selected(filename):
|
||||
var file_data = load(filename)
|
||||
if not file_data.TYPE == "EXP_Dialog_Node_Template_editor":
|
||||
return
|
||||
|
||||
self._Target_Node.set_text(file_data.template)
|
||||
|
||||
|
||||
func _on_Node_changed_offset(nid, new_offset):
|
||||
self._Story_Editor.set_node_property(self._did, nid, "graph_offset", new_offset)
|
||||
|
||||
|
||||
func _on_Node_changed_size(changed_node):
|
||||
var changed_node_nid = changed_node.get_nid()
|
||||
self._Story_Editor.set_node_property(self._did, changed_node_nid, "rect_size", changed_node.rect_size)
|
||||
|
||||
|
||||
func _on_Node_changed_slots(changed_node):
|
||||
var changed_node_nid = changed_node.get_nid()
|
||||
self._unlink_nid_from_story(changed_node_nid)
|
||||
self._disconnect_all_from(changed_node)
|
||||
self._Story_Editor.set_node_property(self._did, changed_node_nid, "slot_amount",
|
||||
changed_node.get_slot_amount())
|
||||
|
||||
|
||||
func _on_Node_erased(deleted_node):
|
||||
var deleted_nid = deleted_node.get_nid()
|
||||
self._unlink_nid_from_story(deleted_nid)
|
||||
self._Story_Editor.erase_node(self._did, deleted_nid)
|
||||
self._disconnect_all_from(deleted_node)
|
||||
deleted_node.queue_free()
|
||||
|
||||
|
||||
func _on_Node_pressed_editor(node):
|
||||
self._Editor.set_target_node(node)
|
||||
self._Editor.visible = true
|
||||
|
||||
|
||||
func _on_Node_pressed_load(node):
|
||||
self._Target_Node = node
|
||||
self._Load_Template.popup_centered_ratio(0.7)
|
||||
|
||||
|
||||
func _on_Node_pressed_save(node):
|
||||
self._Target_Node = node
|
||||
self._Save_Template_As.popup_centered_ratio(0.7)
|
||||
|
||||
|
||||
func _on_Node_text_changed(nid, new_text):
|
||||
self._Story_Editor.set_node_property(self._did, nid, "text", new_text)
|
||||
|
||||
|
||||
func _on_Save_Template_As_file_selected(filename):
|
||||
var save_file = _NodeTemplate.new()
|
||||
save_file.template = self._Target_Node.get_text()
|
||||
ResourceSaver.save(filename, save_file)
|
||||
|
||||
|
||||
func _on_Story_Editor_dialog_edit_pressed(story_editor, did : int):
|
||||
self._Story_Editor = story_editor
|
||||
self._did = did
|
||||
self._Human_Readable_LBL.text = self._Story_Editor.get_dialog_property(self._did, "human_readable_description")
|
||||
self._clear_nodes()
|
||||
self._populate_graph()
|
||||
self._link_node_connections()
|
||||
|
||||
#Private Methods
|
||||
|
||||
func _clear_nodes():
|
||||
self._Graph.clear_connections()
|
||||
var children = self._Graph.get_children()
|
||||
for child in children:
|
||||
if child is GraphNode:
|
||||
child.free()
|
||||
|
||||
|
||||
func _disconnect_all_from(node):
|
||||
var node_name = node.name
|
||||
var connection_list = self._Graph.get_connection_list()
|
||||
for connection in connection_list:
|
||||
if connection["from"] == node.name or connection["to"] == node.name:
|
||||
self._Graph.disconnect_node(connection["from"], connection["from_port"],
|
||||
connection["to"], connection["to_port"])
|
||||
|
||||
|
||||
func _link_node_connections():
|
||||
var node_IDs = self._Story_Editor.get_nids(self._did)
|
||||
for nID in node_IDs:
|
||||
var slots = self._Story_Editor.get_link_slots(self._did, nID)
|
||||
for slot in slots:
|
||||
var to_node_nid = self._Story_Editor.get_nid_link_from(self._did, nID, slot)
|
||||
var to = "NID " + str(to_node_nid)
|
||||
var from = "NID " + str(nID)
|
||||
self._Graph.connect_node(from, slot, to, 0)
|
||||
|
||||
|
||||
func _populate_graph():
|
||||
var node_IDs = self._Story_Editor.get_nids(self._did)
|
||||
for nID in node_IDs:
|
||||
var new_node : GraphNode
|
||||
match self._Story_Editor.get_node_property(self._did, nID, "type"):
|
||||
"line":
|
||||
new_node = _LineNode.instance()
|
||||
var slot_count = self._Story_Editor.get_node_property(self._did, nID, "slot_amount")
|
||||
new_node.set_slot_amount(slot_count)
|
||||
self._Graph.add_child(new_node)
|
||||
new_node.connect("erased", self, "_on_Node_erased")
|
||||
var new_text = self._Story_Editor.get_node_property(self._did, nID, "text")
|
||||
var new_rect_size = self._Story_Editor.get_node_property(self._did, nID, "rect_size")
|
||||
new_node.rect_size = new_rect_size
|
||||
new_node.set_text(new_text)
|
||||
new_node.connect("text_changed", self, "_on_Node_text_changed")
|
||||
new_node.connect("pressed_save", self, "_on_Node_pressed_save")
|
||||
new_node.connect("pressed_load", self, "_on_Node_pressed_load")
|
||||
new_node.connect("pressed_editor", self, "_on_Node_pressed_editor")
|
||||
new_node.connect("changed_slots", self, "_on_Node_changed_slots")
|
||||
new_node.connect("changed_size", self, "_on_Node_changed_size")
|
||||
|
||||
new_node.set_nid(nID)
|
||||
new_node.offset = self._Story_Editor.get_node_property(self._did, nID, "graph_offset")
|
||||
new_node.connect("changed_offset", self, "_on_Node_changed_offset")
|
||||
|
||||
|
||||
func _setup_dialogs():
|
||||
self._Load_Template = EditorFileDialog.new()
|
||||
self._Load_Template.mode = EditorFileDialog.MODE_OPEN_FILE
|
||||
self._Load_Template.add_filter("*.res ; Template files")
|
||||
self._Load_Template.resizable = true
|
||||
self._Load_Template.access = EditorFileDialog.ACCESS_RESOURCES
|
||||
self._Load_Template.current_dir = "res://"
|
||||
self._Load_Template.connect("file_selected", self, "_on_Load_Template_file_selected")
|
||||
self.add_child(self._Load_Template)
|
||||
|
||||
self._Save_Template_As = EditorFileDialog.new()
|
||||
self._Save_Template_As.mode = EditorFileDialog.MODE_SAVE_FILE
|
||||
self._Save_Template_As.add_filter("*.res ; Template files")
|
||||
self._Save_Template_As.resizable = true
|
||||
self._Save_Template_As.access = EditorFileDialog.ACCESS_RESOURCES
|
||||
self._Save_Template_As.current_dir = "res://"
|
||||
self._Save_Template_As.connect("file_selected", self, "_on_Save_Template_As_file_selected")
|
||||
self.add_child(self._Save_Template_As)
|
||||
|
||||
|
||||
func _unlink_nid_from_story(removed_nid):
|
||||
self._Story_Editor.erase_all_links(self._did, removed_nid)
|
||||
var nIDs = self._Story_Editor.get_nids(self._did)
|
||||
for nID in nIDs:
|
||||
var node_slots = self._Story_Editor.get_link_slots(self._did, nID)
|
||||
for slot in node_slots:
|
||||
var to_node_nid = self._Story_Editor.get_nid_link_from(self._did, nID, slot)
|
||||
if to_node_nid == removed_nid:
|
||||
self._Story_Editor.erase_link(self._did, nID, slot)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user