From 062326749ba4a2307168e71d3d5165828b8abb26 Mon Sep 17 00:00:00 2001 From: Michael Rawlings Date: Sun, 18 Feb 2024 08:33:47 -0500 Subject: [PATCH 1/2] Improved Confirmation Dialog (#171) --- addons/pandora/ui/components/entity_tree/entity_tree.gd | 6 +++--- addons/pandora/ui/components/entity_tree/entity_tree.tscn | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/pandora/ui/components/entity_tree/entity_tree.gd b/addons/pandora/ui/components/entity_tree/entity_tree.gd index 9feb4976..4db5f3de 100644 --- a/addons/pandora/ui/components/entity_tree/entity_tree.gd +++ b/addons/pandora/ui/components/entity_tree/entity_tree.gd @@ -50,9 +50,9 @@ func _search_item_recursive(item: TreeItem, text: String) -> bool: func queue_delete(entity_id:String) -> void: - confirm("Confirmation Needed", "Are you sure you want to delete?", func(): - var item = entity_items[entity_id] - var entity = item.get_metadata(0) as PandoraEntity + var item = entity_items[entity_id] + var entity = item.get_metadata(0) as PandoraEntity + confirm("Confirmation Needed", "Are you sure you want to delete '%s'?" % entity.get_entity_name(), func(): entity_deletion_issued.emit(entity) if item.get_parent() != null: item.get_parent().remove_child(item) diff --git a/addons/pandora/ui/components/entity_tree/entity_tree.tscn b/addons/pandora/ui/components/entity_tree/entity_tree.tscn index a732c0b0..f509fa68 100644 --- a/addons/pandora/ui/components/entity_tree/entity_tree.tscn +++ b/addons/pandora/ui/components/entity_tree/entity_tree.tscn @@ -19,4 +19,5 @@ layout_mode = 1 [node name="ConfirmationDialog" type="ConfirmationDialog" parent="."] initial_position = 2 -dialog_text = "Are you sure you want to delete?" +size = Vector2i(303, 80) +dialog_text = "Are you sure you want to delete '%s'?" From f6c58179acd6ab527deecf39d32c885e76c0ce35 Mon Sep 17 00:00:00 2001 From: Shomy <61943525+ShomyKohai@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:05:52 +0100 Subject: [PATCH 2/2] Use correct version for next alpha release (#173) --- addons/pandora/plugin.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pandora/plugin.cfg b/addons/pandora/plugin.cfg index e1b7a1c6..fc8d394d 100644 --- a/addons/pandora/plugin.cfg +++ b/addons/pandora/plugin.cfg @@ -3,5 +3,5 @@ name="Pandora" description="📦 Store items, inventories, spells, mobs and more." author="bitbrain" -version="1.0-alpha4" +version="1.0-alpha6" script="plugin.gd"