[gd_scene load_steps=15 format=2]

[ext_resource path="res://addons/Wol/editor/Editor.gd" type="Script" id=1]
[ext_resource path="res://addons/Wol/editor/WolEditor.gd" type="Script" id=2]
[ext_resource path="res://addons/Wol/editor/WolGraphNode.gd" type="Script" id=3]
[ext_resource path="res://addons/Wol/editor/Preview.gd" type="Script" id=4]
[ext_resource path="res://addons/Wol/Wol.gd" type="Script" id=5]
[ext_resource path="res://addons/Wol/editor/editor_default_font.tres" type="DynamicFont" id=6]
[ext_resource path="res://addons/Wol/editor/editor_theme.tres" type="Theme" id=7]
[ext_resource path="res://addons/Wol/editor/InlineTextEdit.gd" type="Script" id=8]
[ext_resource path="res://addons/Wol/editor/ScrollContainerWithScrollWheel.gd" type="Script" id=9]
[ext_resource path="res://addons/Wol/editor/ScrollContainerWithScrollWheel.gd" type="Script" id=10]
[ext_resource path="res://addons/Wol/icon-white-with-stroke.svg" type="Texture" id=11]
[ext_resource path="res://addons/Wol/editor/AboutDialog.gd" type="Script" id=12]

[sub_resource type="StyleBoxEmpty" id=2]

[sub_resource type="StyleBoxFlat" id=328]
bg_color = Color( 0.345098, 0.345098, 0.345098, 1 )
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8

[node name="WolEditor" type="Panel"]
anchor_right = 1.0
anchor_bottom = 1.0
rect_rotation = 0.00422679
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource( 7 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Menu" type="HBoxContainer" parent="."]
anchor_right = 1.0
rect_min_size = Vector2( 0, 32 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="File" type="MenuButton" parent="Menu"]
margin_right = 38.0
margin_bottom = 32.0
text = "File"
items = [ "New", null, 0, false, false, 0, 0, null, "", false, "Open", null, 0, false, false, 1, 0, null, "", false, "Save", null, 0, false, false, 2, 0, null, "", false, "Save as...", null, 0, false, false, 3, 0, null, "", false ]
switch_on_hover = true

[node name="Settings" type="Button" parent="Menu"]
margin_left = 42.0
margin_right = 112.0
margin_bottom = 32.0
focus_mode = 0
enabled_focus_mode = 0
text = "Settings"
flat = true

[node name="About" type="Button" parent="Menu"]
margin_left = 116.0
margin_right = 171.0
margin_bottom = 32.0
focus_mode = 0
enabled_focus_mode = 0
text = "About"
flat = true

[node name="GraphNodeTemplate" type="GraphNode" parent="."]
visible = false
margin_left = 2.0
margin_top = 318.0
margin_right = 322.0
margin_bottom = 575.0
mouse_filter = 1
title = "Hello world"
offset = Vector2( 120, 0 )
resizable = true
slot/0/left_enabled = false
slot/0/left_type = 0
slot/0/left_color = Color( 1, 1, 1, 1 )
slot/0/right_enabled = false
slot/0/right_type = 0
slot/0/right_color = Color( 1, 1, 1, 1 )
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Wrapper" type="Control" parent="GraphNodeTemplate"]
margin_left = 8.0
margin_top = 24.0
margin_right = 312.0
margin_bottom = 249.0
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="TextEdit" type="TextEdit" parent="GraphNodeTemplate/Wrapper"]
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
custom_colors/safe_line_number_color = Color( 1, 0, 0, 1 )
syntax_highlighting = true
fold_gutter = true
context_menu_enabled = false
virtual_keyboard_enabled = false
wrap_enabled = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ErrorGutter" type="Label" parent="GraphNodeTemplate/Wrapper/TextEdit"]
visible = false
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 16.0
margin_top = -28.0
margin_right = -16.0
margin_bottom = -8.0
grow_horizontal = 0
grow_vertical = 0
custom_colors/font_color = Color( 1, 0, 0, 1 )
valign = 1
autowrap = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Panel" type="Panel" parent="GraphNodeTemplate/Wrapper/TextEdit/ErrorGutter"]
show_behind_parent = true
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -16.0
margin_top = -8.0
margin_right = 16.0
margin_bottom = 8.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TextDebounce" type="Timer" parent="GraphNodeTemplate"]
one_shot = true

[node name="GraphEdit" type="GraphEdit" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 32.0
custom_styles/bg = SubResource( 2 )
snap_distance = 100
show_zoom_label = true
__meta__ = {
"_edit_use_anchors_": false
}

[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchor_top = 0.053
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 0.199999
mouse_filter = 2
custom_constants/separation = 32
alignment = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Preview" type="Panel" parent="HBoxContainer"]
margin_left = 352.0
margin_right = 672.0
margin_bottom = 568.0
rect_min_size = Vector2( 320, 0 )
focus_mode = 1
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Wol" type="Node" parent="HBoxContainer/Preview"]
script = ExtResource( 5 )
variable_storage = {
}

[node name="Tools" type="HBoxContainer" parent="HBoxContainer/Preview"]
anchor_right = 1.0
margin_left = 4.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = 27.8
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Left" type="HBoxContainer" parent="HBoxContainer/Preview/Tools"]
margin_right = 280.0
margin_bottom = 26.0
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="Label" type="Label" parent="HBoxContainer/Preview/Tools/Left"]
margin_top = 3.0
margin_right = 89.0
margin_bottom = 23.0
text = "Protagonist: "

[node name="Protagonist" type="LineEdit" parent="HBoxContainer/Preview/Tools/Left"]
margin_left = 93.0
margin_right = 165.0
margin_bottom = 26.0
rect_min_size = Vector2( 72, 0 )
script = ExtResource( 8 )

[node name="Next" type="Button" parent="HBoxContainer/Preview/Tools/Left"]
margin_left = 169.0
margin_right = 214.0
margin_bottom = 26.0
focus_mode = 0
enabled_focus_mode = 0
text = "Next"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Restart" type="Button" parent="HBoxContainer/Preview/Tools/Left"]
margin_left = 218.0
margin_right = 280.0
margin_bottom = 26.0
focus_mode = 0
enabled_focus_mode = 0
text = "Restart"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Right" type="HBoxContainer" parent="HBoxContainer/Preview/Tools"]
margin_left = 284.0
margin_right = 312.0
margin_bottom = 26.0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 2
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Close" type="Button" parent="HBoxContainer/Preview/Tools/Right"]
margin_left = 4.0
margin_right = 28.0
margin_bottom = 26.0
rect_min_size = Vector2( 24, 0 )
text = "x"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Content" type="ScrollContainer" parent="HBoxContainer/Preview"]
anchor_right = 1.0
anchor_bottom = 0.803
margin_top = 42.0
margin_bottom = 4.89603
mouse_filter = 1
follow_focus = true
scroll_horizontal_enabled = false
script = ExtResource( 9 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="List" type="VBoxContainer" parent="HBoxContainer/Preview/Content"]
margin_right = 320.0
margin_bottom = 419.0
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 18
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PaddingTop" type="Control" parent="HBoxContainer/Preview/Content/List"]
margin_right = 320.0
mouse_filter = 2

[node name="LineTemplate" type="HBoxContainer" parent="HBoxContainer/Preview/Content/List"]
visible = false
margin_top = 18.0
margin_right = 320.0
margin_bottom = 33.0
mouse_filter = 2
alignment = 1

[node name="PaddingLeft" type="Control" parent="HBoxContainer/Preview/Content/List/LineTemplate"]
margin_right = 16.0
margin_bottom = 15.0
rect_min_size = Vector2( 16, 0 )
mouse_filter = 2

[node name="RichTextLabel" type="RichTextLabel" parent="HBoxContainer/Preview/Content/List/LineTemplate"]
margin_left = 20.0
margin_right = 300.0
margin_bottom = 15.0
rect_clip_content = false
mouse_filter = 2
size_flags_horizontal = 3
bbcode_enabled = true
bbcode_text = "Hello world"
text = "Hello world"
fit_content_height = true

[node name="Panel" type="Panel" parent="HBoxContainer/Preview/Content/List/LineTemplate/RichTextLabel"]
show_behind_parent = true
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -8.0
margin_top = -4.0
margin_right = 8.0
margin_bottom = 4.0
mouse_filter = 2
custom_styles/panel = SubResource( 328 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="PaddingRight" type="Control" parent="HBoxContainer/Preview/Content/List/LineTemplate"]
margin_left = 304.0
margin_right = 320.0
margin_bottom = 15.0
rect_min_size = Vector2( 16, 0 )
mouse_filter = 2

[node name="PaddingBottom" type="Control" parent="HBoxContainer/Preview/Content/List"]
margin_top = 18.0
margin_right = 320.0
margin_bottom = 18.0
mouse_filter = 2

[node name="Options" type="ScrollContainer" parent="HBoxContainer/Preview"]
anchor_top = 0.815
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 16.0
margin_top = 4.0
margin_right = -16.0
margin_bottom = -4.0
mouse_filter = 2
follow_focus = true
scroll_horizontal_enabled = false
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false,
"_editor_description_": ""
}

[node name="List" type="VBoxContainer" parent="HBoxContainer/Preview/Options"]
margin_right = 288.0
margin_bottom = 97.08
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 8
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ButtonTemplate" type="Button" parent="HBoxContainer/Preview/Options/List"]
visible = false
margin_right = 320.0
margin_bottom = 20.0
text = "Option"

[node name="Editor" type="Panel" parent="HBoxContainer"]
visible = false
margin_left = 368.0
margin_right = 1008.0
margin_bottom = 568.0
rect_min_size = Vector2( 640, 0 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Tools" type="HBoxContainer" parent="HBoxContainer/Editor"]
anchor_right = 1.0
margin_left = 4.0
margin_top = 4.0
margin_right = -4.0
margin_bottom = 27.8
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Left" type="HBoxContainer" parent="HBoxContainer/Editor/Tools"]
margin_right = 314.0
margin_bottom = 26.0
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="Title" type="LineEdit" parent="HBoxContainer/Editor/Tools/Left"]
margin_right = 144.0
margin_bottom = 26.0
rect_min_size = Vector2( 144, 0 )
script = ExtResource( 8 )
disable_spaces = true

[node name="Play" type="Button" parent="HBoxContainer/Editor/Tools/Left"]
margin_left = 148.0
margin_right = 191.0
margin_bottom = 26.0
focus_mode = 0
enabled_focus_mode = 0
text = "Play"

[node name="Right" type="HBoxContainer" parent="HBoxContainer/Editor/Tools"]
margin_left = 318.0
margin_right = 632.0
margin_bottom = 26.0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 2
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Delete" type="Button" parent="HBoxContainer/Editor/Tools/Right"]
margin_left = 199.0
margin_right = 258.0
margin_bottom = 26.0
text = "Delete"

[node name="Control" type="Control" parent="HBoxContainer/Editor/Tools/Right"]
margin_left = 262.0
margin_right = 286.0
margin_bottom = 26.0
rect_min_size = Vector2( 24, 0 )

[node name="Close" type="Button" parent="HBoxContainer/Editor/Tools/Right"]
margin_left = 290.0
margin_right = 314.0
margin_bottom = 26.0
rect_min_size = Vector2( 24, 0 )
text = "x"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Content" type="Control" parent="HBoxContainer/Editor"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 42.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}

[node name="FileDialog" type="FileDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -297.0
margin_top = -231.0
margin_right = 297.0
margin_bottom = 231.0
rect_min_size = Vector2( 400, 140 )
resizable = true
filters = PoolStringArray( "*.yarn", "*.wol" )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="DeleteNodeDialog" type="ConfirmationDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -223.0
margin_top = -70.0
margin_right = 223.0
margin_bottom = 70.0
rect_min_size = Vector2( 400, 140 )
dialog_text = "Are you sure you want to delete the \"%s\" node from your dialogue?

You can't undo this action."
__meta__ = {
"_edit_use_anchors_": false
}

[node name="AboutDialog" type="WindowDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -115.0
margin_top = -112.0
margin_right = 115.0
margin_bottom = 203.0
window_title = "About Wol"
script = ExtResource( 12 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="RichTextLabel" type="RichTextLabel" parent="AboutDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 146.0
margin_right = -8.0
margin_bottom = -6.0
custom_fonts/normal_font = ExtResource( 6 )
bbcode_enabled = true
bbcode_text = "Wol actively maintained by [url=https://bram.dingelstad.works]Bram Dingelstad[/url] ([url=https://hire.bram.dingelstad.works]hire me[/url]).

Based on [url=https://github.com/kyperbelt/GDYarn]GDYarn by kyperbelt[/url] & [url=https://yarnspinner.dev/]YarnSpinner by Secret Labs[/url]."
text = "Wol actively maintained by Bram Dingelstad (hire me).

Based on GDYarn by kyperbelt & YarnSpinner by Secret Labs."

[node name="TextureRect" type="TextureRect" parent="AboutDialog"]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -62.0
margin_right = 62.0
margin_bottom = 124.0
texture = ExtResource( 11 )

[node name="Label" type="Label" parent="AboutDialog/TextureRect"]
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -26.5
margin_top = -12.0
margin_right = 26.5
margin_bottom = 8.0
grow_horizontal = 2
grow_vertical = 2
text = "Wol (alpha1)"
align = 1
valign = 1

[node name="SettingsDialog" type="WindowDialog" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -224.5
margin_top = -157.5
margin_right = 224.5
margin_bottom = 157.5
window_title = "Settings"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="VBoxContainer" type="VBoxContainer" parent="SettingsDialog"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 16.0
margin_top = 8.0
margin_right = -16.0
margin_bottom = -8.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="RichTextLabel2" type="RichTextLabel" parent="SettingsDialog/VBoxContainer"]
margin_right = 417.0
margin_bottom = 67.0
size_flags_vertical = 3
bbcode_enabled = true
bbcode_text = "
[i]Settings are disabled for now as they're not implemented.[/i]"
text = "
Settings are disabled for now as they're not implemented."
fit_content_height = true

[node name="HiDPI" type="HBoxContainer" parent="SettingsDialog/VBoxContainer"]
margin_top = 71.0
margin_right = 417.0
margin_bottom = 107.0
rect_min_size = Vector2( 0, 36 )

[node name="Label" type="Label" parent="SettingsDialog/VBoxContainer/HiDPI"]
margin_top = 8.0
margin_right = 187.0
margin_bottom = 28.0
hint_tooltip = "When your display has HiDPI capabilities, some of the text might seem unsharp.

Enabling this option allows for sharper text."
mouse_filter = 1
text = "Use HiDPI when available:"

[node name="CheckBox" type="CheckBox" parent="SettingsDialog/VBoxContainer/HiDPI"]
margin_left = 393.0
margin_right = 417.0
margin_bottom = 36.0
size_flags_horizontal = 10
disabled = true
flat = true

[node name="AlternativeNodeConnectionMethod" type="HBoxContainer" parent="SettingsDialog/VBoxContainer"]
margin_top = 111.0
margin_right = 417.0
margin_bottom = 147.0
rect_min_size = Vector2( 0, 36 )

[node name="Label" type="Label" parent="SettingsDialog/VBoxContainer/AlternativeNodeConnectionMethod"]
margin_top = 8.0
margin_right = 258.0
margin_bottom = 28.0
hint_tooltip = "Godot's usual method for connecting nodes in a graph is input on the left, output on the right. 

Since this looks very hectic, this alternative method only uses one connection that implies an input and/or output."
mouse_filter = 1
text = "Alternative node connection method"

[node name="CheckBox" type="CheckBox" parent="SettingsDialog/VBoxContainer/AlternativeNodeConnectionMethod"]
margin_left = 393.0
margin_right = 417.0
margin_bottom = 36.0
size_flags_horizontal = 10
disabled = true
flat = true

[node name="FontSize" type="HBoxContainer" parent="SettingsDialog/VBoxContainer"]
margin_top = 151.0
margin_right = 417.0
margin_bottom = 187.0
rect_min_size = Vector2( 0, 36 )

[node name="Label" type="Label" parent="SettingsDialog/VBoxContainer/FontSize"]
margin_top = 8.0
margin_right = 103.0
margin_bottom = 28.0
hint_tooltip = "The font size of the text editor for dialogue. Will also affect preview size in node overview."
mouse_filter = 1
text = "Editor font size"

[node name="CheckBox" type="LineEdit" parent="SettingsDialog/VBoxContainer/FontSize"]
margin_left = 373.0
margin_right = 417.0
margin_bottom = 36.0
size_flags_horizontal = 10
text = "16"
align = 1
editable = false

[node name="DefaultProtagonist" type="HBoxContainer" parent="SettingsDialog/VBoxContainer"]
margin_top = 191.0
margin_right = 417.0
margin_bottom = 227.0
rect_min_size = Vector2( 0, 36 )

[node name="Label" type="Label" parent="SettingsDialog/VBoxContainer/DefaultProtagonist"]
margin_top = 8.0
margin_right = 137.0
margin_bottom = 28.0
hint_tooltip = "The default protagonist the \"Preview\" looks to find. It will prefer this one over other names.

Use this if your main character is never denoted as \"You\"."
mouse_filter = 1
text = "Default protagonist"

[node name="CheckBox" type="LineEdit" parent="SettingsDialog/VBoxContainer/DefaultProtagonist"]
margin_left = 317.0
margin_right = 417.0
margin_bottom = 36.0
rect_min_size = Vector2( 100, 0 )
size_flags_horizontal = 10
size_flags_stretch_ratio = 2.0
text = "You"
align = 1
editable = false
placeholder_text = "You"

[node name="RichTextLabel" type="RichTextLabel" parent="SettingsDialog/VBoxContainer"]
margin_top = 278.0
margin_right = 417.0
margin_bottom = 299.0
size_flags_vertical = 10
bbcode_enabled = true
bbcode_text = "Idea for a setting or feature? [url=https://github.com/bram-dingelstad/Wol/issues]Submit an issue on Github[/url]."
text = "Idea for a setting or feature? Submit an issue on Github."
fit_content_height = true

[connection signal="meta_clicked" from="SettingsDialog/VBoxContainer/RichTextLabel" to="AboutDialog" method="_on_url_click"]
