mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-12-17 03:24:43 -05:00
Added dialog with options for desaturation
Not sure if options for RGBA channels are really needed here, but I kept them from invert colors. We could remove them in the future if they are unneeded.
This commit is contained in:
parent
6f645d996d
commit
ebc9eab773
6 changed files with 236 additions and 13 deletions
101
src/UI/Dialogs/ImageEffects/DesaturateDialog.tscn
Normal file
101
src/UI/Dialogs/ImageEffects/DesaturateDialog.tscn
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/UI/Dialogs/ImageEffects/DesaturateDialog.gd" type="Script" id=1]
|
||||
|
||||
[node name="DesaturateDialog" type="ConfirmationDialog"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 70.0
|
||||
window_title = "Desaturation"
|
||||
resizable = true
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 271.0
|
||||
margin_bottom = 260.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Preview" type="TextureRect" parent="VBoxContainer"]
|
||||
margin_right = 263.0
|
||||
margin_bottom = 200.0
|
||||
rect_min_size = Vector2( 200, 200 )
|
||||
expand = true
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="RGBAContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 204.0
|
||||
margin_right = 263.0
|
||||
margin_bottom = 224.0
|
||||
alignment = 1
|
||||
|
||||
[node name="RButton" type="Button" parent="VBoxContainer/RGBAContainer"]
|
||||
margin_left = 83.0
|
||||
margin_right = 103.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Modify Red Channel"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
pressed = true
|
||||
text = "R"
|
||||
|
||||
[node name="GButton" type="Button" parent="VBoxContainer/RGBAContainer"]
|
||||
margin_left = 107.0
|
||||
margin_right = 129.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Modify Green Channel"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
pressed = true
|
||||
text = "G"
|
||||
|
||||
[node name="BButton" type="Button" parent="VBoxContainer/RGBAContainer"]
|
||||
margin_left = 133.0
|
||||
margin_right = 154.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Modify Blue Channel"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
pressed = true
|
||||
text = "B"
|
||||
|
||||
[node name="AButton" type="Button" parent="VBoxContainer/RGBAContainer"]
|
||||
margin_left = 158.0
|
||||
margin_right = 179.0
|
||||
margin_bottom = 20.0
|
||||
hint_tooltip = "Modify Alpha Channel"
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
text = "A"
|
||||
|
||||
[node name="OptionsContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 228.0
|
||||
margin_right = 263.0
|
||||
margin_bottom = 252.0
|
||||
|
||||
[node name="SelectionCheckBox" type="CheckBox" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_right = 160.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
pressed = true
|
||||
text = "Only affect selection"
|
||||
|
||||
[node name="AffectOptionButton" type="OptionButton" parent="VBoxContainer/OptionsContainer"]
|
||||
margin_left = 164.0
|
||||
margin_right = 263.0
|
||||
margin_bottom = 24.0
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Current cel"
|
||||
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null, "All projects", null, false, 3, null ]
|
||||
selected = 0
|
||||
[connection signal="about_to_show" from="." to="." method="_on_FlipImageDialog_about_to_show"]
|
||||
[connection signal="confirmed" from="." to="." method="_on_FlipImageDialog_confirmed"]
|
||||
[connection signal="popup_hide" from="." to="." method="_on_FlipImageDialog_popup_hide"]
|
||||
[connection signal="toggled" from="VBoxContainer/RGBAContainer/RButton" to="." method="_on_RButton_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/RGBAContainer/GButton" to="." method="_on_GButton_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/RGBAContainer/BButton" to="." method="_on_BButton_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/RGBAContainer/AButton" to="." method="_on_AButton_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/OptionsContainer/SelectionCheckBox" to="." method="_on_SelectionCheckBox_toggled"]
|
||||
[connection signal="item_selected" from="VBoxContainer/OptionsContainer/AffectOptionButton" to="." method="_on_AffectOptionButton_item_selected"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue