From 606b9936e55aa43c342f9128c90b43662b328be3 Mon Sep 17 00:00:00 2001 From: SweetId <2630750+SweetId@users.noreply.github.com> Date: Tue, 17 Oct 2023 18:05:56 -0400 Subject: [PATCH] Leve_New uses popup --- .../Actions/EditorAction_Level_New.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/NazaraEditor/Core/Application/Actions/EditorAction_Level_New.cpp b/src/NazaraEditor/Core/Application/Actions/EditorAction_Level_New.cpp index 3075370..67e7b7e 100644 --- a/src/NazaraEditor/Core/Application/Actions/EditorAction_Level_New.cpp +++ b/src/NazaraEditor/Core/Application/Actions/EditorAction_Level_New.cpp @@ -1,10 +1,24 @@ #include #include +#include namespace Nz { void EditorAction_Level_New::Execute() { - Nz::EditorBaseApplication::Instance()->NewLevel(); + Nz::EditorPopupManager::Instance()->CreatePopup({ + .title = "Warning", + .description = "Are you sure you want to create a new level?", + .choices = { + { + .name = "Yes", + .callback = []() { Nz::EditorBaseApplication::Instance()->NewLevel(); } + }, + { + .name = "No" + } + } + }); + } } \ No newline at end of file