[gd_scene load_steps=11 format=3 uid="uid://53oqf8j7uyuu"]

[ext_resource type="Script" uid="uid://b1ii4843yuwkw" path="res://addons/curved_lines_2d/assign_fill_inspector_form.gd" id="1_ogtsd"]
[ext_resource type="StyleBox" uid="uid://v0ueesjbdyrk" path="res://addons/curved_lines_2d/snazzy_toggle_button.stylebox" id="3_alhox"]
[ext_resource type="Texture2D" uid="uid://31qakec1dm6y" path="res://addons/curved_lines_2d/Key.svg" id="3_d26vq"]
[ext_resource type="Texture2D" uid="uid://caqsvv6rdxkm4" path="res://addons/curved_lines_2d/Gradients.svg" id="4_d26vq"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ogtsd"]
content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0.0823529, 0.0941176, 0.117647, 1)

[sub_resource type="ButtonGroup" id="ButtonGroup_6uned"]

[sub_resource type="AtlasTexture" id="AtlasTexture_7smxo"]
atlas = ExtResource("4_d26vq")
region = Rect2(0, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_j40rh"]
atlas = ExtResource("4_d26vq")
region = Rect2(32, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_7rdpo"]
atlas = ExtResource("4_d26vq")
region = Rect2(65, 0, 32, 32)

[sub_resource type="AtlasTexture" id="AtlasTexture_alhox"]
atlas = ExtResource("4_d26vq")
region = Rect2(96, 0, 32, 32)

[node name="AssignFillInspectorForm" type="VBoxContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_ogtsd")

[node name="FillColorFieldContainer" type="HBoxContainer" parent="."]
layout_mode = 2

[node name="Label" type="Label" parent="FillColorFieldContainer"]
clip_contents = true
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "This will set the color of the assigned Polygon2D."
mouse_filter = 0
text = "Fill Color*"

[node name="HBoxContainer" type="HBoxContainer" parent="FillColorFieldContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="ColorPickerButton" type="ColorPickerButton" parent="FillColorFieldContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "This will set the color of the assigned Polygon2D."
theme_override_styles/normal = SubResource("StyleBoxFlat_ogtsd")
text = "Fill"
color = Color(1, 1, 1, 1)

[node name="AddFillKeyFrameButton" type="Button" parent="FillColorFieldContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
tooltip_text = "Add key frame for Polygon2D's color property"
icon = ExtResource("3_d26vq")

[node name="GradientFieldContainer" type="HBoxContainer" parent="."]
unique_name_in_owner = true
layout_mode = 2

[node name="Label" type="Label" parent="GradientFieldContainer"]
clip_contents = true
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "- This will change set  the texture of the Polygon2D to a GradientTexture2D. 
- If the Polygon2D already has an active texture, it will be replaced."
mouse_filter = 0
text = "Gradient*"

[node name="HBoxContainer" type="HBoxContainer" parent="GradientFieldContainer"]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3

[node name="RemoveGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
unique_name_in_owner = true
clip_contents = true
layout_mode = 2
size_flags_horizontal = 0
tooltip_text = "Remove texture of the Polygon2D"
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
theme_override_styles/pressed = ExtResource("3_alhox")
toggle_mode = true
button_pressed = true
keep_pressed_outside = true
button_group = SubResource("ButtonGroup_6uned")
icon = SubResource("AtlasTexture_7smxo")

[node name="LinearGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
unique_name_in_owner = true
clip_contents = true
layout_mode = 2
size_flags_horizontal = 0
tooltip_text = "Set the texture of the Polygon2D to a Linear Gradient"
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
theme_override_styles/pressed = ExtResource("3_alhox")
toggle_mode = true
keep_pressed_outside = true
button_group = SubResource("ButtonGroup_6uned")
icon = SubResource("AtlasTexture_j40rh")

[node name="RadialGradientToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
unique_name_in_owner = true
clip_contents = true
layout_mode = 2
size_flags_horizontal = 0
tooltip_text = "Set the texture of the Polygon2D to a Radial Gradient"
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
theme_override_styles/pressed = ExtResource("3_alhox")
toggle_mode = true
keep_pressed_outside = true
button_group = SubResource("ButtonGroup_6uned")
icon = SubResource("AtlasTexture_7rdpo")

[node name="OtherTextureToggleButton" type="Button" parent="GradientFieldContainer/HBoxContainer"]
unique_name_in_owner = true
clip_contents = true
layout_mode = 2
size_flags_horizontal = 0
tooltip_text = "This disabled toggle is active if another type of texture is applied to the Polygon2D"
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
theme_override_styles/pressed = ExtResource("3_alhox")
disabled = true
toggle_mode = true
keep_pressed_outside = true
button_group = SubResource("ButtonGroup_6uned")
icon = SubResource("AtlasTexture_alhox")

[node name="GradientStopColorButtonContainer" type="HBoxContainer" parent="."]
unique_name_in_owner = true
layout_mode = 2

[node name="Label" type="Label" parent="GradientStopColorButtonContainer"]
clip_contents = true
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 0
tooltip_text = "- Change the stop colors of the gradient
- To add or remove color-stops, use the guide and handles in the 2D Viewport
- Or click the `Edit Polgyon2D` button below and use the built-in texture editor"
mouse_filter = 0
text = "Stop Colors*"

[node name="HBoxContainer" type="HBoxContainer" parent="GradientStopColorButtonContainer"]
layout_mode = 2
size_flags_horizontal = 3

[node name="StopColorButtonsContainer" type="HFlowContainer" parent="GradientStopColorButtonContainer/HBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 40)
layout_mode = 2
size_flags_horizontal = 3

[node name="BatchInsertGradientKeyFrameButton" type="Button" parent="GradientStopColorButtonContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 4
tooltip_text = "Pressing this button will add key frames for all aspects* of the GradientTexture2D on the Polygon2D:
- The start- and end position
- The stop colors
- The stop positions of the colors

* For more refined control, use the inspector foe the assigned Polygon2D node"
icon = ExtResource("3_d26vq")

[node name="ButtonContainer" type="HBoxContainer" parent="."]
layout_mode = 2

[node name="Label2" type="Label" parent="ButtonContainer"]
clip_contents = true
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "This will create a new Polygon2D node and assign it to the polygon property of this ScalableVectorScape2D."
mouse_filter = 0
text = "Add Fill*"

[node name="CreateFillButton" type="Button" parent="ButtonContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 2
tooltip_text = "This will create a new Polygon2D node and assign it to the polygon property of this ScalableVectorScape2D."
text = "Add Fill"

[node name="HSeparator" type="HSeparator" parent="."]
layout_mode = 2

[node name="ButtonContainer2" type="HBoxContainer" parent="."]
layout_mode = 2

[node name="Label2" type="Label" parent="ButtonContainer2"]
clip_contents = true
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
size_flags_horizontal = 3
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape  in the Scene Tree.

Use this for advanced features which are already built-in into godot, like gradients and repeating textures."
mouse_filter = 0
text = "Edit Polygon2D *"

[node name="GotoPolygon2DButton" type="Button" parent="ButtonContainer2"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 2
tooltip_text = "Click on this button to select the Polygon2D node that is assigned to this shape  in the Scene Tree.

Use this for advanced features which are already built-in into godot, like gradients and repeating textures."
text = "Edit Polygon2D"

[connection signal="color_changed" from="FillColorFieldContainer/HBoxContainer/ColorPickerButton" to="." method="_on_color_picker_button_color_changed"]
[connection signal="toggled" from="FillColorFieldContainer/HBoxContainer/ColorPickerButton" to="." method="_on_color_picker_button_toggled"]
[connection signal="pressed" from="FillColorFieldContainer/HBoxContainer/AddFillKeyFrameButton" to="." method="_on_add_fill_key_frame_button_pressed"]
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/RemoveGradientToggleButton" to="." method="_on_remove_gradient_toggle_button_button_down"]
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/LinearGradientToggleButton" to="." method="_on_linear_gradient_toggle_button_button_down"]
[connection signal="button_down" from="GradientFieldContainer/HBoxContainer/RadialGradientToggleButton" to="." method="_on_radial_gradient_toggle_button_button_down"]
[connection signal="pressed" from="GradientStopColorButtonContainer/HBoxContainer/BatchInsertGradientKeyFrameButton" to="." method="_on_batch_insert_gradient_key_frame_button_pressed"]
[connection signal="pressed" from="ButtonContainer/CreateFillButton" to="." method="_on_create_fill_button_pressed"]
[connection signal="pressed" from="ButtonContainer2/GotoPolygon2DButton" to="." method="_on_goto_polygon_2d_button_pressed"]
