2022-10-04 21:42:01 +00:00
|
|
|
[gd_scene load_steps=6 format=2]
|
2020-07-09 12:22:17 +00:00
|
|
|
|
2022-10-04 21:42:01 +00:00
|
|
|
[ext_resource path="res://src/UI/Nodes/ValueSlider.tscn" type="PackedScene" id=1]
|
2021-02-02 15:48:17 +00:00
|
|
|
[ext_resource path="res://src/Tools/BaseTool.tscn" type="PackedScene" id=2]
|
2020-07-09 12:22:17 +00:00
|
|
|
[ext_resource path="res://src/Tools/Draw.gd" type="Script" id=3]
|
|
|
|
|
2021-02-02 15:48:17 +00:00
|
|
|
[sub_resource type="StyleBoxFlat" id=1]
|
2020-09-29 15:00:43 +00:00
|
|
|
bg_color = Color( 1, 1, 1, 1 )
|
|
|
|
border_color = Color( 1, 1, 1, 1 )
|
|
|
|
corner_radius_top_left = 5
|
|
|
|
corner_radius_top_right = 5
|
|
|
|
corner_radius_bottom_right = 5
|
|
|
|
corner_radius_bottom_left = 5
|
|
|
|
anti_aliasing = false
|
|
|
|
|
2021-02-02 15:48:17 +00:00
|
|
|
[sub_resource type="StyleBoxFlat" id=2]
|
2020-09-27 17:35:46 +00:00
|
|
|
bg_color = Color( 1, 1, 1, 1 )
|
|
|
|
border_color = Color( 1, 1, 1, 1 )
|
|
|
|
corner_radius_top_left = 5
|
|
|
|
corner_radius_top_right = 5
|
|
|
|
corner_radius_bottom_right = 5
|
|
|
|
corner_radius_bottom_left = 5
|
|
|
|
anti_aliasing = false
|
|
|
|
|
2020-07-09 12:22:17 +00:00
|
|
|
[node name="ToolOptions" instance=ExtResource( 2 )]
|
|
|
|
script = ExtResource( 3 )
|
|
|
|
|
2022-09-19 21:58:39 +00:00
|
|
|
[node name="Brush" type="HBoxContainer" parent="." index="2"]
|
|
|
|
margin_top = 26.0
|
2020-07-09 12:22:17 +00:00
|
|
|
margin_right = 116.0
|
2022-09-19 21:58:39 +00:00
|
|
|
margin_bottom = 58.0
|
2020-07-09 12:22:17 +00:00
|
|
|
alignment = 1
|
|
|
|
|
2020-09-27 17:35:46 +00:00
|
|
|
[node name="Type" type="Button" parent="Brush" index="0"]
|
2022-10-04 21:42:01 +00:00
|
|
|
margin_right = 32.0
|
2020-07-09 12:22:17 +00:00
|
|
|
margin_bottom = 32.0
|
2020-09-27 17:35:46 +00:00
|
|
|
rect_min_size = Vector2( 32, 32 )
|
2020-07-09 12:22:17 +00:00
|
|
|
hint_tooltip = "Select a brush"
|
|
|
|
mouse_default_cursor_shape = 2
|
|
|
|
size_flags_horizontal = 0
|
2021-02-02 15:48:17 +00:00
|
|
|
custom_styles/hover = SubResource( 1 )
|
|
|
|
custom_styles/pressed = SubResource( 1 )
|
|
|
|
custom_styles/focus = SubResource( 2 )
|
|
|
|
custom_styles/disabled = SubResource( 2 )
|
|
|
|
custom_styles/normal = SubResource( 1 )
|
2020-07-09 12:22:17 +00:00
|
|
|
|
|
|
|
[node name="Texture" type="TextureRect" parent="Brush/Type" index="0"]
|
|
|
|
margin_right = 32.0
|
|
|
|
margin_bottom = 32.0
|
|
|
|
expand = true
|
|
|
|
stretch_mode = 6
|
|
|
|
|
2022-10-04 21:42:01 +00:00
|
|
|
[node name="BrushSize" parent="Brush" index="1" instance=ExtResource( 1 )]
|
|
|
|
margin_left = 36.0
|
|
|
|
margin_right = 116.0
|
2020-07-09 12:22:17 +00:00
|
|
|
margin_bottom = 32.0
|
|
|
|
min_value = 1.0
|
2020-08-23 15:14:30 +00:00
|
|
|
max_value = 25.0
|
2020-07-09 12:22:17 +00:00
|
|
|
value = 1.0
|
|
|
|
allow_greater = true
|
2022-10-04 21:42:01 +00:00
|
|
|
prefix = "Size:"
|
|
|
|
suffix = "px"
|
2022-11-10 15:36:09 +00:00
|
|
|
is_global = true
|
2020-07-09 12:22:17 +00:00
|
|
|
|
2022-10-04 21:42:01 +00:00
|
|
|
[node name="ColorInterpolation" parent="." index="3" instance=ExtResource( 1 )]
|
2020-07-09 12:22:17 +00:00
|
|
|
visible = false
|
2022-10-04 21:42:01 +00:00
|
|
|
margin_top = 62.0
|
2020-07-09 12:22:17 +00:00
|
|
|
margin_right = 116.0
|
2022-10-04 21:42:01 +00:00
|
|
|
margin_bottom = 86.0
|
2020-07-09 12:22:17 +00:00
|
|
|
hint_tooltip = "0: Color from the brush itself, 100: the currently selected color"
|
2022-10-04 21:42:01 +00:00
|
|
|
prefix = "Brush color from:"
|
2020-07-09 12:22:17 +00:00
|
|
|
|
|
|
|
[connection signal="pressed" from="Brush/Type" to="." method="_on_BrushType_pressed"]
|
2022-10-04 21:42:01 +00:00
|
|
|
[connection signal="value_changed" from="Brush/BrushSize" to="." method="_on_BrushSize_value_changed"]
|
|
|
|
[connection signal="value_changed" from="ColorInterpolation" to="." method="_on_InterpolateFactor_value_changed"]
|