mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor
This commit is contained in:
parent
19bef1ae76
commit
10f0bd0290
5 changed files with 26 additions and 34 deletions
|
|
@ -33,7 +33,7 @@ EngineController::EngineController(Engine& engine) : engine(engine) {
|
|||
void EngineController::deleteWorld(const std::string& name) {
|
||||
fs::path folder = engine.getPaths().getWorldFolderByName(name);
|
||||
guiutil::confirm(
|
||||
engine.getGUI(),
|
||||
engine.getGUI()->getMenu(),
|
||||
langs::get(L"delete-confirm", L"world") + L" (" +
|
||||
util::str2wstr_utf8(folder.u8string()) + L")",
|
||||
[=]() {
|
||||
|
|
@ -100,8 +100,8 @@ static void show_convert_request(
|
|||
for (const auto& line : report->getDataLoss()) {
|
||||
text += util::str2wstr_utf8(line) + L"\n";
|
||||
}
|
||||
guiutil::confirmWithMemo(
|
||||
engine.getGUI(),
|
||||
guiutil::confirm_with_memo(
|
||||
engine.getGUI()->getMenu(),
|
||||
langs::get(message),
|
||||
text,
|
||||
on_confirm,
|
||||
|
|
@ -111,7 +111,7 @@ static void show_convert_request(
|
|||
return;
|
||||
}
|
||||
guiutil::confirm(
|
||||
engine.getGUI(),
|
||||
engine.getGUI()->getMenu(),
|
||||
langs::get(message),
|
||||
on_confirm,
|
||||
L"",
|
||||
|
|
@ -156,7 +156,7 @@ static void load_world(
|
|||
engine.onWorldOpen(std::move(level));
|
||||
} catch (const world_load_error& error) {
|
||||
guiutil::alert(
|
||||
engine.getGUI(),
|
||||
engine.getGUI()->getMenu(),
|
||||
langs::get(L"Error") + L": " + util::str2wstr_utf8(error.what())
|
||||
);
|
||||
return;
|
||||
|
|
@ -326,7 +326,7 @@ void EngineController::reconfigPacks(
|
|||
|
||||
if (hasIndices) {
|
||||
guiutil::confirm(
|
||||
engine.getGUI(),
|
||||
engine.getGUI()->getMenu(),
|
||||
langs::get(L"remove-confirm", L"pack") + L" (" +
|
||||
util::str2wstr_utf8(ss.str()) + L")",
|
||||
[=]() { removeFunc(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue