mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Added a warning dialog when clicking the remove palette button
This prevents accidental palette deletions
This commit is contained in:
parent
24463076d2
commit
37a8f51249
|
@ -12,6 +12,7 @@ Laurenz Reinthaler (Schweini07), PinyaColada
|
||||||
- Buttons for moving the current frame left or right. ([#344](https://github.com/Orama-Interactive/Pixelorama/pull/344))
|
- Buttons for moving the current frame left or right. ([#344](https://github.com/Orama-Interactive/Pixelorama/pull/344))
|
||||||
- Creating palettes from sprites has been enhanced - you can now choose if you want to get colors from the selection, current cel, entire frame or all frames, and if you want the colors to have an alpha component.
|
- Creating palettes from sprites has been enhanced - you can now choose if you want to get colors from the selection, current cel, entire frame or all frames, and if you want the colors to have an alpha component.
|
||||||
- A new "Cut" option in the Edit menu or by pressing `Ctrl-X`. It cuts (deletes & copies) the selection, and you can later paste it. ([#345](https://github.com/Orama-Interactive/Pixelorama/pull/345))
|
- A new "Cut" option in the Edit menu or by pressing `Ctrl-X`. It cuts (deletes & copies) the selection, and you can later paste it. ([#345](https://github.com/Orama-Interactive/Pixelorama/pull/345))
|
||||||
|
- Added a warning dialog when clicking the remove palette button, to prevent accidental palette deletions.
|
||||||
- A new purple theme.
|
- A new purple theme.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -1408,6 +1408,9 @@ msgstr ""
|
||||||
msgid "Remove currently selected palette"
|
msgid "Remove currently selected palette"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Are you sure you want to remove this palette? (Cannot be undone)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "You can't remove more palettes!"
|
msgid "You can't remove more palettes!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ var current_palette = "Default"
|
||||||
var from_palette : Palette
|
var from_palette : Palette
|
||||||
|
|
||||||
onready var palette_from_sprite_dialog = $"../../../../PaletteFromSpriteDialog"
|
onready var palette_from_sprite_dialog = $"../../../../PaletteFromSpriteDialog"
|
||||||
|
onready var remove_palette_warning = $"../../../../RemovePaletteWarning"
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
@ -411,7 +412,8 @@ func _on_NewPaletteDialog_popup_hide() -> void:
|
||||||
|
|
||||||
|
|
||||||
func _on_RemovePalette_pressed() -> void:
|
func _on_RemovePalette_pressed() -> void:
|
||||||
remove_palette(current_palette)
|
remove_palette_warning.popup_centered()
|
||||||
|
Global.dialog_open(true)
|
||||||
|
|
||||||
|
|
||||||
func _on_PaletteFromSpriteDialog_confirmed() -> void:
|
func _on_PaletteFromSpriteDialog_confirmed() -> void:
|
||||||
|
@ -420,3 +422,11 @@ func _on_PaletteFromSpriteDialog_confirmed() -> void:
|
||||||
|
|
||||||
func _on_PaletteFromSpriteDialog_popup_hide() -> void:
|
func _on_PaletteFromSpriteDialog_popup_hide() -> void:
|
||||||
Global.dialog_open(false)
|
Global.dialog_open(false)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_RemovePaletteWarning_confirmed() -> void:
|
||||||
|
remove_palette(current_palette)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_RemovePaletteWarning_popup_hide() -> void:
|
||||||
|
Global.dialog_open(false)
|
||||||
|
|
|
@ -244,6 +244,11 @@ mouse_default_cursor_shape = 2
|
||||||
text = "Current cel"
|
text = "Current cel"
|
||||||
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null ]
|
items = [ "Current cel", null, false, 0, null, "Current frame", null, false, 1, null, "All frames", null, false, 2, null ]
|
||||||
selected = 0
|
selected = 0
|
||||||
|
|
||||||
|
[node name="RemovePaletteWarning" type="ConfirmationDialog" parent="."]
|
||||||
|
margin_right = 200.0
|
||||||
|
margin_bottom = 70.0
|
||||||
|
dialog_text = "Are you sure you want to remove this palette? (Cannot be undone)"
|
||||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
|
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"]
|
||||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
|
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"]
|
||||||
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/RemovePalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePalette_pressed"]
|
[connection signal="pressed" from="PaletteVBoxContainer/CenterContainer/PaletteButtons/RemovePalette" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePalette_pressed"]
|
||||||
|
@ -254,3 +259,5 @@ selected = 0
|
||||||
[connection signal="popup_hide" from="PaletteImportFileDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_NewPaletteDialog_popup_hide"]
|
[connection signal="popup_hide" from="PaletteImportFileDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_NewPaletteDialog_popup_hide"]
|
||||||
[connection signal="confirmed" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_confirmed"]
|
[connection signal="confirmed" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_confirmed"]
|
||||||
[connection signal="popup_hide" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_popup_hide"]
|
[connection signal="popup_hide" from="PaletteFromSpriteDialog" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteFromSpriteDialog_popup_hide"]
|
||||||
|
[connection signal="confirmed" from="RemovePaletteWarning" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePaletteWarning_confirmed"]
|
||||||
|
[connection signal="popup_hide" from="RemovePaletteWarning" to="PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_RemovePaletteWarning_popup_hide"]
|
||||||
|
|
Loading…
Reference in a new issue