[gd_scene load_steps=20 format=3 uid="uid://wo0hqxkst808"]

[ext_resource type="Texture2D" uid="uid://cjrokejjsp5dm" path="res://assets/graphics/misc/horizontal_mirror_off.png" id="1"]
[ext_resource type="Texture2D" uid="uid://hiduvaa73fr6" path="res://assets/graphics/misc/vertical_mirror_off.png" id="2"]
[ext_resource type="Script" path="res://src/UI/GlobalToolOptions/GlobalToolOptions.gd" id="3"]
[ext_resource type="Texture2D" uid="uid://22h12g8p3jtd" path="res://assets/graphics/misc/pixel_perfect_off.png" id="4"]
[ext_resource type="Script" path="res://src/UI/Nodes/ValueSlider.gd" id="5"]
[ext_resource type="Texture2D" uid="uid://dg3dumyfj1682" path="res://assets/graphics/misc/dynamics.png" id="6"]
[ext_resource type="Texture2D" uid="uid://di8au2u87jgv5" path="res://assets/graphics/misc/uncheck.png" id="7"]
[ext_resource type="PackedScene" uid="uid://bmsc0s03pwji4" path="res://src/UI/Nodes/MaxMinEdit.tscn" id="8"]

[sub_resource type="InputEventAction" id="InputEventAction_4k08w"]
action = &"horizontal_mirror"

[sub_resource type="Shortcut" id="Shortcut_eld87"]
events = [SubResource("InputEventAction_4k08w")]

[sub_resource type="InputEventAction" id="InputEventAction_24etr"]
action = &"vertical_mirror"

[sub_resource type="Shortcut" id="Shortcut_ai7qc"]
events = [SubResource("InputEventAction_24etr")]

[sub_resource type="InputEventAction" id="InputEventAction_ebgk6"]
action = &"pixel_perfect"

[sub_resource type="Shortcut" id="Shortcut_vcyug"]
events = [SubResource("InputEventAction_ebgk6")]

[sub_resource type="ButtonGroup" id="ButtonGroup_ahrcw"]
allow_unpress = true

[sub_resource type="ButtonGroup" id="ButtonGroup_t01h7"]
allow_unpress = true

[sub_resource type="Gradient" id="3"]
interpolation_mode = 1
offsets = PackedFloat32Array(0, 0, 1)
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1)

[sub_resource type="GradientTexture2D" id="4"]
gradient = SubResource("3")

[sub_resource type="GradientTexture2D" id="5"]
gradient = SubResource("3")

[node name="Global Tool Options" type="PanelContainer"]
offset_left = 1.0
offset_right = 195.0
offset_bottom = 50.0
script = ExtResource("3")

[node name="ScrollContainer" type="ScrollContainer" parent="."]
custom_minimum_size = Vector2(36, 36)
layout_mode = 2

[node name="CenterContainer" type="CenterContainer" parent="ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3

[node name="GridContainer" type="GridContainer" parent="ScrollContainer/CenterContainer"]
layout_mode = 2
size_flags_vertical = 0
columns = 4

[node name="Horizontal" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Enable horizontal mirrored drawing"
mouse_default_cursor_shape = 2
toggle_mode = true
shortcut = SubResource("Shortcut_eld87")

[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Horizontal"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -10.0
offset_top = -10.5
offset_right = 10.0
offset_bottom = 10.5
texture = ExtResource("1")

[node name="Vertical" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Enable vertical mirrored drawing"
mouse_default_cursor_shape = 2
toggle_mode = true
shortcut = SubResource("Shortcut_ai7qc")

[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Vertical"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -10.0
offset_top = -10.0
offset_right = 10.0
offset_bottom = 10.0
texture = ExtResource("2")

[node name="PixelPerfect" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Pixel Perfect
Makes lines smooth by removing the extra pixels on the edges"
mouse_default_cursor_shape = 2
toggle_mode = true
shortcut = SubResource("Shortcut_vcyug")

[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/PixelPerfect"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -11.0
offset_top = -10.0
offset_right = 11.0
offset_bottom = 10.0
texture = ExtResource("4")

[node name="Dynamics" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
unique_name_in_owner = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
tooltip_text = "Dynamics"
mouse_default_cursor_shape = 2

[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Dynamics"]
layout_mode = 0
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -11.0
offset_top = -10.0
offset_right = 11.0
offset_bottom = 10.0
texture = ExtResource("6")

[node name="DynamicsPanel" type="PopupPanel" parent="."]
canvas_item_default_texture_filter = 0
size = Vector2i(300, 334)

[node name="VBoxContainer" type="VBoxContainer" parent="DynamicsPanel"]
offset_left = 8.0
offset_top = 8.0
offset_right = 292.0
offset_bottom = 326.0

[node name="StabilizerContainer" type="HBoxContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2

[node name="EnableStabilizer" type="CheckButton" parent="DynamicsPanel/VBoxContainer/StabilizerContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "Stabilizer"

[node name="StabilizerValue" type="TextureProgressBar" parent="DynamicsPanel/VBoxContainer/StabilizerContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
min_value = 1.0
max_value = 64.0
value = 16.0
allow_greater = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("5")

[node name="DynamicsOptions" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2
columns = 3

[node name="Control" type="Control" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
custom_minimum_size = Vector2(20, 20)
layout_mode = 2
size_flags_horizontal = 3

[node name="PressureLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
layout_mode = 2
size_flags_horizontal = 3
text = "Pressure"

[node name="VelocityLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
layout_mode = 2
size_flags_horizontal = 3
text = "Velocity"

[node name="AlphaLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
layout_mode = 2
text = "Alpha"

[node name="AlphaPressureButton" type="Button" parent="DynamicsPanel/VBoxContainer/DynamicsOptions" groups=["UIButtons"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_ahrcw")
icon_alignment = 1
expand_icon = true

[node name="TextureRect" type="TextureRect" parent="DynamicsPanel/VBoxContainer/DynamicsOptions/AlphaPressureButton"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("7")
expand_mode = 1

[node name="AlphaVelocityButton" type="Button" parent="DynamicsPanel/VBoxContainer/DynamicsOptions" groups=["UIButtons"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_ahrcw")

[node name="TextureRect" type="TextureRect" parent="DynamicsPanel/VBoxContainer/DynamicsOptions/AlphaVelocityButton"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("7")
expand_mode = 1

[node name="SizeLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
layout_mode = 2
text = "Size"

[node name="SizePressureButton" type="Button" parent="DynamicsPanel/VBoxContainer/DynamicsOptions" groups=["UIButtons"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_t01h7")

[node name="TextureRect" type="TextureRect" parent="DynamicsPanel/VBoxContainer/DynamicsOptions/SizePressureButton"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("7")
expand_mode = 1

[node name="SizeVelocityButton" type="Button" parent="DynamicsPanel/VBoxContainer/DynamicsOptions" groups=["UIButtons"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
toggle_mode = true
button_group = SubResource("ButtonGroup_t01h7")

[node name="TextureRect" type="TextureRect" parent="DynamicsPanel/VBoxContainer/DynamicsOptions/SizeVelocityButton"]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
texture = ExtResource("7")
expand_mode = 1

[node name="LimitsHeader" type="HBoxContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2

[node name="Label" type="Label" parent="DynamicsPanel/VBoxContainer/LimitsHeader"]
layout_mode = 2
theme_type_variation = &"HeaderSmall"
text = "Value limits"

[node name="HSeparator" type="HSeparator" parent="DynamicsPanel/VBoxContainer/LimitsHeader"]
layout_mode = 2
size_flags_horizontal = 3

[node name="LimitContainer" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2
columns = 3

[node name="AlphaLabel" type="Label" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Alpha"

[node name="AlphaMin" type="TextureProgressBar" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
max_value = 1.0
step = 0.01
value = 0.1
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("5")
prefix = "Start"
snap_step = 0.1

[node name="AlphaMax" type="TextureProgressBar" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
max_value = 1.0
step = 0.01
value = 1.0
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("5")
prefix = "End"
snap_step = 0.1

[node name="SizeLabel" type="Label" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Size"

[node name="SizeMin" type="TextureProgressBar" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
max_value = 25.0
value = 1.0
allow_greater = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("5")
prefix = "Start"

[node name="SizeMax" type="TextureProgressBar" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
max_value = 25.0
value = 4.0
allow_greater = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("5")
prefix = "End"

[node name="ThresholdsHeader" type="HBoxContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2

[node name="Label" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdsHeader"]
layout_mode = 2
theme_type_variation = &"HeaderSmall"
text = "Thresholds"

[node name="HSeparator" type="HSeparator" parent="DynamicsPanel/VBoxContainer/ThresholdsHeader"]
layout_mode = 2
size_flags_horizontal = 3

[node name="ThresholdContainer" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
layout_mode = 2
columns = 2

[node name="ThresholdPressureLabel" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
layout_mode = 2
text = "Pressure"

[node name="ThresholdPressure" parent="DynamicsPanel/VBoxContainer/ThresholdContainer" instance=ExtResource("8")]
layout_mode = 2
size_flags_horizontal = 3
start = 0.2
end = 0.8

[node name="TextureRect" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressure" index="0"]
texture = SubResource("4")

[node name="PressurePreview" type="ProgressBar" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressure/TextureRect" index="0"]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.294118)
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
max_value = 1.0
step = 0.001
value = 0.497

[node name="Value" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressure/TextureRect" index="1"]
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 1.0
offset_bottom = 23.0

[node name="ThresholdVelocityLabel" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
layout_mode = 2
text = "Velocity"

[node name="ThresholdVelocity" parent="DynamicsPanel/VBoxContainer/ThresholdContainer" instance=ExtResource("8")]
layout_mode = 2
start = 0.2
end = 0.8

[node name="TextureRect" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocity" index="0"]
texture = SubResource("5")

[node name="VelocityPreview" type="ProgressBar" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocity/TextureRect" index="0"]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.294118)
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
max_value = 1.0
step = 0.001

[node name="Value" parent="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocity/TextureRect" index="1"]
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 1.0
offset_bottom = 23.0

[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="toggled" from="ScrollContainer/CenterContainer/GridContainer/Horizontal" to="." method="_on_Horizontal_toggled"]
[connection signal="toggled" from="ScrollContainer/CenterContainer/GridContainer/Vertical" to="." method="_on_Vertical_toggled"]
[connection signal="toggled" from="ScrollContainer/CenterContainer/GridContainer/PixelPerfect" to="." method="_on_PixelPerfect_toggled"]
[connection signal="pressed" from="ScrollContainer/CenterContainer/GridContainer/Dynamics" to="." method="_on_Dynamics_pressed"]
[connection signal="toggled" from="DynamicsPanel/VBoxContainer/StabilizerContainer/EnableStabilizer" to="." method="_on_enable_stabilizer_toggled"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/StabilizerContainer/StabilizerValue" to="." method="_on_stabilizer_value_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/LimitContainer/AlphaMin" to="." method="_on_AlphaMin_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/LimitContainer/AlphaMax" to="." method="_on_AlphaMax_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/LimitContainer/SizeMin" to="." method="_on_SizeMin_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/LimitContainer/SizeMax" to="." method="_on_SizeMax_value_changed"]
[connection signal="updated" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressure" to="." method="_on_ThresholdPressure_updated"]
[connection signal="updated" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocity" to="." method="_on_ThresholdVelocity_updated"]

[editable path="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressure"]
[editable path="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocity"]
