mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Initial commit.
:)
This commit is contained in:
23
source/GUI/Screen/DeleteWorldScreen.cpp
Normal file
23
source/GUI/Screen/DeleteWorldScreen.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "DeleteWorldScreen.hpp"
|
||||
#include "SelectWorldScreen.hpp"
|
||||
|
||||
DeleteWorldScreen::DeleteWorldScreen(const LevelSummary& level) :
|
||||
ConfirmScreen(nullptr,
|
||||
"Are you sure you want to delete this world?",
|
||||
"'" + level.field_18 + "' will be lost forever!",
|
||||
"Delete", "Cancel", 0),
|
||||
m_level(level)
|
||||
{
|
||||
// highlight the cancel button so the user will have to do 1 extra action to delete their world
|
||||
m_tabButtonIndex = 1;
|
||||
}
|
||||
|
||||
void DeleteWorldScreen::postResult(bool b)
|
||||
{
|
||||
if (b)
|
||||
{
|
||||
m_pMinecraft->getLevelSource()->deleteLevel(m_level.field_0);
|
||||
}
|
||||
|
||||
m_pMinecraft->setScreen(new SelectWorldScreen);
|
||||
}
|
||||
Reference in New Issue
Block a user