1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-07 19:09:50 +00:00
Pixelorama/src/UI/GlobalToolOptions/GlobalToolOptions.tscn
Emmanouil Papadeas c60675b4e7 [WIP] Added dynamics, such as pen pressure (finally!) and mouse velocity affecting alpha and brush size
Alpha currently produces ugly results when drawing on top of opaque colors. See the comment in Draw.gd like 445 for more details.
2023-02-17 15:29:55 +02:00

442 lines
14 KiB
Plaintext

[gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/graphics/misc/horizontal_mirror_off.png" type="Texture" id=1]
[ext_resource path="res://assets/graphics/misc/vertical_mirror_off.png" type="Texture" id=2]
[ext_resource path="res://src/UI/GlobalToolOptions/GlobalToolOptions.gd" type="Script" id=3]
[ext_resource path="res://assets/graphics/misc/pixel_perfect_off.png" type="Texture" id=4]
[ext_resource path="res://src/UI/Nodes/ValueSlider.gd" type="Script" id=5]
[sub_resource type="ButtonGroup" id=1]
[sub_resource type="ButtonGroup" id=2]
[node name="Global Tool Options" type="PanelContainer"]
margin_left = 1.0
margin_right = 195.0
margin_bottom = 50.0
rect_min_size = Vector2( 0, 36 )
script = ExtResource( 3 )
[node name="ScrollContainer" type="ScrollContainer" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 187.0
margin_bottom = 43.0
rect_min_size = Vector2( 36, 36 )
[node name="CenterContainer" type="CenterContainer" parent="ScrollContainer"]
margin_right = 183.0
margin_bottom = 32.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="ScrollContainer/CenterContainer"]
margin_right = 183.0
margin_bottom = 32.0
size_flags_vertical = 0
columns = 4
[node name="Horizontal" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
hint_tooltip = "Enable horizontal mirrored drawing"
mouse_default_cursor_shape = 2
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Horizontal"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -10.0
margin_top = -10.5
margin_right = 10.0
margin_bottom = 10.5
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Vertical" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
margin_left = 36.0
margin_right = 68.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
hint_tooltip = "Enable vertical mirrored drawing"
mouse_default_cursor_shape = 2
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/Vertical"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -10.0
margin_top = -10.0
margin_right = 10.0
margin_bottom = 10.0
texture = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PixelPerfect" type="Button" parent="ScrollContainer/CenterContainer/GridContainer" groups=["UIButtons"]]
margin_left = 72.0
margin_right = 104.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
hint_tooltip = "Pixel Perfect
Makes lines smooth by removing the extra pixels on the edges"
mouse_default_cursor_shape = 2
toggle_mode = true
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/CenterContainer/GridContainer/PixelPerfect"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -11.0
margin_top = -10.0
margin_right = 11.0
margin_bottom = 10.0
texture = ExtResource( 4 )
[node name="Dynamics" type="Button" parent="ScrollContainer/CenterContainer/GridContainer"]
unique_name_in_owner = true
margin_left = 108.0
margin_right = 183.0
margin_bottom = 32.0
mouse_default_cursor_shape = 2
text = "Dynamics"
[node name="DynamicsPanel" type="PopupPanel" parent="."]
margin_left = 7.0
margin_top = 7.0
margin_right = 267.0
margin_bottom = 267.0
rect_min_size = Vector2( 260, 260 )
[node name="VBoxContainer" type="VBoxContainer" parent="DynamicsPanel"]
margin_left = 4.0
margin_top = 4.0
margin_right = 256.0
margin_bottom = 256.0
[node name="DynamicsOptions" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
margin_right = 252.0
margin_bottom = 108.0
columns = 3
[node name="Control" type="Control" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
margin_right = 82.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 20 )
size_flags_horizontal = 3
[node name="PressureLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
margin_left = 86.0
margin_top = 3.0
margin_right = 167.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Pressure"
align = 1
[node name="VelocityLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
margin_left = 171.0
margin_top = 3.0
margin_right = 252.0
margin_bottom = 17.0
size_flags_horizontal = 3
text = "Velocity"
align = 1
[node name="AlphaLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
margin_top = 37.0
margin_right = 82.0
margin_bottom = 51.0
text = "Alpha"
[node name="AlphaPressureButton" type="CheckButton" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
unique_name_in_owner = true
margin_left = 86.0
margin_top = 24.0
margin_right = 167.0
margin_bottom = 64.0
mouse_default_cursor_shape = 2
group = SubResource( 1 )
[node name="AlphaVelocityButton" type="CheckButton" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
unique_name_in_owner = true
margin_left = 171.0
margin_top = 24.0
margin_right = 252.0
margin_bottom = 64.0
mouse_default_cursor_shape = 2
group = SubResource( 1 )
[node name="SizeLabel" type="Label" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
margin_top = 81.0
margin_right = 82.0
margin_bottom = 95.0
text = "Size"
[node name="SizePressureButton" type="CheckButton" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
unique_name_in_owner = true
margin_left = 86.0
margin_top = 68.0
margin_right = 167.0
margin_bottom = 108.0
mouse_default_cursor_shape = 2
group = SubResource( 2 )
[node name="SizeVelocityButton" type="CheckButton" parent="DynamicsPanel/VBoxContainer/DynamicsOptions"]
unique_name_in_owner = true
margin_left = 171.0
margin_top = 68.0
margin_right = 252.0
margin_bottom = 108.0
mouse_default_cursor_shape = 2
group = SubResource( 2 )
[node name="LimitsHeader" type="HBoxContainer" parent="DynamicsPanel/VBoxContainer"]
margin_top = 112.0
margin_right = 252.0
margin_bottom = 126.0
[node name="Label" type="Label" parent="DynamicsPanel/VBoxContainer/LimitsHeader"]
margin_right = 76.0
margin_bottom = 14.0
theme_type_variation = "Header"
text = "Value limits"
[node name="HSeparator" type="HSeparator" parent="DynamicsPanel/VBoxContainer/LimitsHeader"]
margin_left = 80.0
margin_right = 252.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="LimitContainer" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
margin_top = 130.0
margin_right = 252.0
margin_bottom = 162.0
columns = 3
[node name="AlphaLabel" type="Label" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_right = 82.0
margin_bottom = 14.0
size_flags_horizontal = 3
text = "Alpha"
[node name="AlphaMin" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_left = 86.0
margin_right = 167.0
margin_bottom = 14.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
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 = "Min"
snap_step = 0.1
[node name="AlphaMax" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_left = 171.0
margin_right = 252.0
margin_bottom = 14.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
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 = "Max"
snap_step = 0.1
[node name="SizeLabel" type="Label" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_top = 18.0
margin_right = 82.0
margin_bottom = 32.0
size_flags_horizontal = 3
text = "Size"
[node name="SizeMin" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_left = 86.0
margin_top = 18.0
margin_right = 167.0
margin_bottom = 32.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
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 = "Min"
[node name="SizeMax" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/LimitContainer"]
margin_left = 171.0
margin_top = 18.0
margin_right = 252.0
margin_bottom = 32.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
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 = "Max"
[node name="ThresholdsHeader" type="HBoxContainer" parent="DynamicsPanel/VBoxContainer"]
margin_top = 166.0
margin_right = 252.0
margin_bottom = 180.0
[node name="Label" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdsHeader"]
margin_right = 70.0
margin_bottom = 14.0
theme_type_variation = "Header"
text = "Thresholds"
[node name="HSeparator" type="HSeparator" parent="DynamicsPanel/VBoxContainer/ThresholdsHeader"]
margin_left = 74.0
margin_right = 252.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="ThresholdContainer" type="GridContainer" parent="DynamicsPanel/VBoxContainer"]
margin_top = 184.0
margin_right = 252.0
margin_bottom = 216.0
columns = 3
[node name="ThresholdPressureLabel" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_right = 82.0
margin_bottom = 14.0
size_flags_horizontal = 3
text = "Pressure"
[node name="ThresholdPressureMin" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_left = 86.0
margin_right = 167.0
margin_bottom = 14.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
theme_type_variation = "ValueSlider"
max_value = 1.0
step = 0.01
value = 0.2
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 5 )
prefix = "Min"
snap_step = 0.1
[node name="ThresholdPressureMax" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_left = 171.0
margin_right = 252.0
margin_bottom = 14.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
theme_type_variation = "ValueSlider"
max_value = 1.0
step = 0.01
value = 0.8
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 5 )
prefix = "Max"
snap_step = 0.1
[node name="ThresholdVelocityLabel" type="Label" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_top = 18.0
margin_right = 82.0
margin_bottom = 32.0
size_flags_horizontal = 3
text = "Velocity"
[node name="ThresholdVelocityMin" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_left = 86.0
margin_top = 18.0
margin_right = 167.0
margin_bottom = 32.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
theme_type_variation = "ValueSlider"
max_value = 1.0
step = 0.01
value = 0.2
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 5 )
prefix = "Min"
snap_step = 0.1
[node name="ThresholdVelocityMax" type="TextureProgress" parent="DynamicsPanel/VBoxContainer/ThresholdContainer"]
margin_left = 171.0
margin_top = 18.0
margin_right = 252.0
margin_bottom = 32.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
theme_type_variation = "ValueSlider"
max_value = 1.0
step = 0.01
value = 0.8
nine_patch_stretch = true
stretch_margin_left = 3
stretch_margin_top = 3
stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource( 5 )
prefix = "Max"
snap_step = 0.1
[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="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="value_changed" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressureMin" to="." method="_on_ThresholdPressureMin_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdPressureMax" to="." method="_on_ThresholdPressureMax_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocityMin" to="." method="_on_ThresholdVelocityMin_value_changed"]
[connection signal="value_changed" from="DynamicsPanel/VBoxContainer/ThresholdContainer/ThresholdVelocityMax" to="." method="_on_ThresholdVelocityMax_value_changed"]