mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
Make a lot of changes to world and source/gui
This commit is contained in:
31
source/gui/screens/DeleteWorldScreen.cpp
Normal file
31
source/gui/screens/DeleteWorldScreen.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#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