Can now delete entity pressing delete

This commit is contained in:
Antoine Pilote
2024-08-16 18:07:00 -04:00
parent 1fd9ce8cae
commit 5b53585515

View File

@@ -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;