mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 05:34:43 -04:00
Add new empty palette working
This commit is contained in:
parent
18b9480a00
commit
b08452034d
3 changed files with 268 additions and 272 deletions
119
Prefabs/EditPalettePopup.tscn
Normal file
119
Prefabs/EditPalettePopup.tscn
Normal file
|
@ -0,0 +1,119 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Scripts/EditPalettePopup.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Assets/Graphics/Timeline/New_Frame.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Assets/Graphics/Layers/delete_layer.png" type="Texture" id=3]
|
||||
|
||||
[node name="EditPalettePopup" type="WindowDialog"]
|
||||
margin_right = 600.0
|
||||
margin_bottom = 550.0
|
||||
rect_min_size = Vector2( 600, 550 )
|
||||
window_title = "Edit Palette"
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 10.0
|
||||
margin_top = 10.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = -10.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_right = 580.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="EditPaletteColorPicker" type="ColorPicker" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 4.0
|
||||
margin_top = 4.0
|
||||
margin_right = 4.0
|
||||
margin_bottom = 4.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 294.0
|
||||
margin_right = 540.0
|
||||
margin_bottom = 482.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="EditPaletteGridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/Panel"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 8
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
margin_left = 544.0
|
||||
margin_right = 580.0
|
||||
margin_bottom = 482.0
|
||||
|
||||
[node name="AddSwatchButton" type="TextureButton" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||
margin_right = 36.0
|
||||
margin_bottom = 36.0
|
||||
texture_normal = ExtResource( 2 )
|
||||
|
||||
[node name="RemoveSwatchButton" type="TextureButton" parent="VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||
margin_top = 40.0
|
||||
margin_right = 36.0
|
||||
margin_bottom = 72.0
|
||||
texture_normal = ExtResource( 3 )
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 486.0
|
||||
margin_right = 580.0
|
||||
margin_bottom = 503.0
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer3"]
|
||||
margin_top = 1.0
|
||||
margin_right = 68.0
|
||||
margin_bottom = 16.0
|
||||
text = "Color Name:"
|
||||
|
||||
[node name="EditPaletteColorNameLineEdit" type="LineEdit" parent="VBoxContainer/HBoxContainer3"]
|
||||
margin_left = 72.0
|
||||
margin_right = 580.0
|
||||
margin_bottom = 17.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
|
||||
margin_top = 507.0
|
||||
margin_right = 580.0
|
||||
margin_bottom = 530.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpacerControl" type="Control" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_right = 159.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="EditPaletteSaveButton" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 163.0
|
||||
margin_right = 201.0
|
||||
margin_bottom = 23.0
|
||||
text = "Save"
|
||||
|
||||
[node name="SpacerControl2" type="Control" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 205.0
|
||||
margin_right = 364.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="EditPaletteCancelButton" type="Button" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 368.0
|
||||
margin_right = 417.0
|
||||
margin_bottom = 23.0
|
||||
text = "Cancel"
|
||||
|
||||
[node name="SpacerControl3" type="Control" parent="VBoxContainer/HBoxContainer2"]
|
||||
margin_left = 421.0
|
||||
margin_right = 580.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_horizontal = 3
|
||||
[connection signal="color_changed" from="VBoxContainer/HBoxContainer/EditPaletteColorPicker" to="." method="_on_EditPaletteColorPicker_color_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/VBoxContainer/AddSwatchButton" to="." method="_on_AddSwatchButton_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/VBoxContainer/RemoveSwatchButton" to="." method="_on_RemoveSwatchButton_pressed"]
|
||||
[connection signal="text_changed" from="VBoxContainer/HBoxContainer3/EditPaletteColorNameLineEdit" to="." method="_on_EditPaletteColorNameLineEdit_text_changed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/EditPaletteSaveButton" to="." method="_on_EditPaletteSaveButton_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer2/EditPaletteCancelButton" to="." method="_on_EditPaletteCancelButton_pressed"]
|
25
Prefabs/NewPaletteDialog.tscn
Normal file
25
Prefabs/NewPaletteDialog.tscn
Normal file
|
@ -0,0 +1,25 @@
|
|||
[gd_scene format=2]
|
||||
|
||||
[node name="NewPaletteDialog" type="ConfirmationDialog"]
|
||||
margin_right = 200.0
|
||||
margin_bottom = 70.0
|
||||
window_title = "Create a new custom palette from existing default?"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="."]
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 365.0
|
||||
margin_bottom = 34.0
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer2"]
|
||||
margin_top = 4.0
|
||||
margin_right = 77.0
|
||||
margin_bottom = 19.0
|
||||
text = "Palette Name:"
|
||||
|
||||
[node name="NewPaletteNameLineEdit" type="LineEdit" parent="HBoxContainer2"]
|
||||
margin_left = 81.0
|
||||
margin_right = 307.0
|
||||
margin_bottom = 23.0
|
||||
size_flags_horizontal = 3
|
||||
expand_to_text_length = true
|
Loading…
Add table
Add a link
Reference in a new issue