mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-04 03:34:18 +03:00
24 lines
600 B
C++
24 lines
600 B
C++
#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);
|
|
}
|