From 5b53585515cffe449e6fa68b0a6fbcc9915ae23e Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Fri, 16 Aug 2024 18:07:00 -0400 Subject: [PATCH] Can now delete entity pressing delete --- Editor/src/Windows/EditorInterface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 8299aff9..94a7d179 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -787,6 +787,11 @@ namespace Nuake { m_IsRenaming = true; } + if (!m_IsRenaming && Selection.Type == EditorSelectionType::Entity && Input::IsKeyPressed(Key::DELETE)) + { + QueueDeletion = Selection.Entity; + } + if (ImGui::BeginPopupContextItem()) { Selection = EditorSelection(e); @@ -804,7 +809,7 @@ namespace Nuake { } ImGui::Separator(); } - + if (ImGui::Selectable("Remove")) { QueueDeletion = e;