Leve_New uses popup
This commit is contained in:
parent
9a30f858ad
commit
606b9936e5
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue