1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-13 17:23:08 +00:00
Pixelorama/src/Palette/EditPaletteDialog.tscn
Variable fd5adef1d9
Allow user to move Palettes to Trash/Recycle Bin instead of deleting them permanently (#914)
* move paletes to bin instead of deleting them permanently

* changed emit_signal to deleted.emit()

* allow user to choose between permanent and temporary deletion

* added translation for "Move to bin"

* changed delete dialog to a confirmation dialog

* added "Delete Permanently"
2023-10-11 19:20:05 +03:00

121 lines
4 KiB
Plaintext

[gd_scene load_steps=2 format=3 uid="uid://c0p84w7umxwt1"]
[ext_resource type="Script" path="res://src/Palette/EditPaletteDialog.gd" id="1"]
[node name="EditPaletteDialog" type="ConfirmationDialog"]
title = "Edit Palette"
size = Vector2i(409, 559)
script = ExtResource("1")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = -8.0
offset_bottom = -49.0
[node name="PaletteMetadata" type="GridContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
columns = 2
[node name="NameLabel" type="Label" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
text = "Name:"
[node name="Name" type="LineEdit" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(0, 24)
layout_mode = 2
size_flags_horizontal = 3
[node name="CommentLabel" type="Label" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
size_flags_vertical = 0
text = "Comment:"
[node name="Comment" type="TextEdit" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(0, 75)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="WidthLabel" type="Label" parent="VBoxContainer/PaletteMetadata"]
layout_mode = 2
text = "Width:"
[node name="Width" type="SpinBox" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(0, 24)
layout_mode = 2
size_flags_horizontal = 3
min_value = 1.0
max_value = 64.0
value = 1.0
[node name="HeightLabel" type="Label" parent="VBoxContainer/PaletteMetadata"]
layout_mode = 2
text = "Height:"
[node name="Height" type="SpinBox" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(0, 24)
layout_mode = 2
size_flags_horizontal = 3
min_value = 1.0
max_value = 64.0
value = 1.0
[node name="PathLabel" type="Label" parent="VBoxContainer/PaletteMetadata"]
layout_mode = 2
text = "Path:"
[node name="Path" type="TextEdit" parent="VBoxContainer/PaletteMetadata"]
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
size_flags_horizontal = 3
[node name="SizeReducedWarning" type="Label" parent="VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.603922, 0.603922, 1)
text = "Reducing palette size will reset positions of colors. Colors that don't fit in new palette size will be lost!"
horizontal_alignment = 1
vertical_alignment = 2
autowrap_mode = 3
[node name="AlreadyExistsWarning" type="Label" parent="VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.603922, 0.603922, 1)
text = "Palette with the same name and path already exists!"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 3
[node name="DeleteConfirmation" type="ConfirmationDialog" parent="."]
size = Vector2i(445, 105)
ok_button_text = "Delete Permanently"
[node name="Label" type="Label" parent="DeleteConfirmation"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = -8.0
offset_bottom = -49.0
grow_horizontal = 2
grow_vertical = 2
text = "Delete Palette?"
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="confirmed" from="." to="." method="_on_EditPaletteDialog_confirmed"]
[connection signal="custom_action" from="." to="." method="_on_EditPaletteDialog_custom_action"]
[connection signal="visibility_changed" from="." to="." method="_on_EditPaletteDialog_visibility_changed"]
[connection signal="text_changed" from="VBoxContainer/PaletteMetadata/Name" to="." method="_on_Name_text_changed"]
[connection signal="value_changed" from="VBoxContainer/PaletteMetadata/Width" to="." method="_on_size_value_changed"]
[connection signal="value_changed" from="VBoxContainer/PaletteMetadata/Height" to="." method="_on_size_value_changed"]
[connection signal="confirmed" from="DeleteConfirmation" to="." method="_on_delete_confirmation_confirmed"]
[connection signal="custom_action" from="DeleteConfirmation" to="." method="_on_delete_confirmation_custom_action"]