Leve_New uses popup

This commit is contained in:
SweetId 2023-10-17 18:05:56 -04:00
parent 9a30f858ad
commit 606b9936e5
1 changed files with 15 additions and 1 deletions

View File

@ -1,10 +1,24 @@
#include <NazaraEditor/Core/Application/Actions/EditorAction_Level_New.hpp>
#include <NazaraEditor/Core/Application/BaseApplication.hpp>
#include <NazaraEditor/Core/UI/PopupManager.hpp>
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"
}
}
});
}
}