[gd_scene load_steps=6 format=3 uid="uid://u0y5xogg636e"]

[ext_resource type="Script" path="res://src/UI/Dialogs/ImageEffects/GradientDialog.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://bybqhhayl5ay5" path="res://src/UI/Dialogs/ImageEffects/ImageEffectParent.tscn" id="2"]
[ext_resource type="PackedScene" uid="uid://bn4aw27dj7pwi" path="res://src/UI/Nodes/GradientEdit.tscn" id="3"]
[ext_resource type="Script" path="res://src/UI/Nodes/Sliders/ValueSlider.gd" id="4"]
[ext_resource type="PackedScene" uid="uid://bbnqcxa20a5a5" path="res://src/UI/Nodes/Sliders/ValueSliderV2.tscn" id="5"]

[node name="GradientDialog" instance=ExtResource("2")]
title = "Gradient"
size = Vector2i(700, 603)
script = ExtResource("1")

[node name="VBoxContainer" parent="." index="3"]
offset_right = 692.0
offset_bottom = 554.0

[node name="GradientEdit" parent="VBoxContainer" index="2" instance=ExtResource("3")]
layout_mode = 2

[node name="GradientOptions" type="GridContainer" parent="VBoxContainer" index="3"]
layout_mode = 2
columns = 2

[node name="ShapeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="0" groups=["gradient_common"]]
layout_mode = 2
size_flags_horizontal = 3
text = "Shape:"

[node name="ShapeOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="1" groups=["gradient_common"]]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
selected = 0
item_count = 2
popup/item_0/text = "Linear"
popup/item_1/text = "Radial"
popup/item_1/id = 1

[node name="DitheringLabel" type="Label" parent="VBoxContainer/GradientOptions" index="2" groups=["gradient_common"]]
layout_mode = 2
text = "Dithering pattern:"

[node name="DitheringOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="3" groups=["gradient_common"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
selected = 0
item_count = 1
popup/item_0/text = "None"

[node name="RepeatLabel" type="Label" parent="VBoxContainer/GradientOptions" index="4" groups=["gradient_common"]]
layout_mode = 2
text = "Repeat:"

[node name="RepeatOptionButton" type="OptionButton" parent="VBoxContainer/GradientOptions" index="5" groups=["gradient_common"]]
unique_name_in_owner = true
layout_mode = 2
mouse_default_cursor_shape = 2
selected = 0
item_count = 4
popup/item_0/text = "None"
popup/item_1/text = "Repeat"
popup/item_1/id = 1
popup/item_2/text = "Mirror"
popup/item_2/id = 2
popup/item_3/text = "Truncate"
popup/item_3/id = 3

[node name="PositionLabel" type="Label" parent="VBoxContainer/GradientOptions" index="6" groups=["gradient_linear"]]
layout_mode = 2
text = "Position:"

[node name="PositionSlider" type="TextureProgressBar" parent="VBoxContainer/GradientOptions" index="7" groups=["gradient_linear"]]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
value = 50.0
allow_greater = true
allow_lesser = true
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("4")
suffix = "%"
snap_step = 10.0

[node name="SizeLabel" type="Label" parent="VBoxContainer/GradientOptions" index="8" groups=["gradient_linear"]]
layout_mode = 2
text = "Size:"

[node name="SizeSlider" type="TextureProgressBar" parent="VBoxContainer/GradientOptions" index="9" groups=["gradient_linear"]]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
min_value = 1.0
max_value = 200.0
value = 100.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("4")
suffix = "%"
snap_step = 10.0

[node name="AngleLabel" type="Label" parent="VBoxContainer/GradientOptions" index="10" groups=["gradient_linear"]]
layout_mode = 2
text = "Angle:"

[node name="AngleSlider" type="TextureProgressBar" parent="VBoxContainer/GradientOptions" index="11" groups=["gradient_linear"]]
unique_name_in_owner = true
layout_mode = 2
focus_mode = 2
mouse_default_cursor_shape = 2
theme_type_variation = &"ValueSlider"
max_value = 360.0
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("4")
suffix = "°"
snap_step = 45.0

[node name="CenterLabel" type="Label" parent="VBoxContainer/GradientOptions" index="12" groups=["gradient_radial"]]
visible = false
layout_mode = 2
size_flags_vertical = 1
text = "Center:"

[node name="CenterSlider" parent="VBoxContainer/GradientOptions" index="13" groups=["gradient_radial"] instance=ExtResource("5")]
unique_name_in_owner = true
visible = false
layout_mode = 2
value = Vector2(50, 50)
allow_greater = true
allow_lesser = true
snap_step = 10.0
suffix_x = "%"
suffix_y = "%"

[node name="RadiusLabel" type="Label" parent="VBoxContainer/GradientOptions" index="14" groups=["gradient_radial"]]
visible = false
layout_mode = 2
size_flags_vertical = 1
text = "Radius:"

[node name="RadiusSlider" parent="VBoxContainer/GradientOptions" index="15" groups=["gradient_radial"] instance=ExtResource("5")]
unique_name_in_owner = true
visible = false
layout_mode = 2
value = Vector2(1, 1)
min_value = Vector2(0.01, 0.01)
max_value = Vector2(10, 10)
step = 0.01
allow_greater = true
show_ratio = true

[connection signal="updated" from="VBoxContainer/GradientEdit" to="." method="_on_GradientEdit_updated"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/ShapeOptionButton" to="." method="_on_ShapeOptionButton_item_selected"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/DitheringOptionButton" to="." method="_on_DitheringOptionButton_item_selected"]
[connection signal="item_selected" from="VBoxContainer/GradientOptions/RepeatOptionButton" to="." method="_on_RepeatOptionButton_item_selected"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/PositionSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/SizeSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/AngleSlider" to="." method="_value_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/CenterSlider" to="." method="_value_v2_changed"]
[connection signal="value_changed" from="VBoxContainer/GradientOptions/RadiusSlider" to="." method="_value_v2_changed"]
