mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add gui.alert & critical fixes
This commit is contained in:
parent
b9ff1db086
commit
a3d35cd10f
7 changed files with 52 additions and 25 deletions
|
|
@ -86,25 +86,25 @@ bool menus::call(Engine& engine, runnable func) {
|
|||
engine.setScreen(std::make_shared<MenuScreen>(engine));
|
||||
// could not to find or read pack
|
||||
guiutil::alert(
|
||||
gui->getMenu(), langs::get(L"error.pack-not-found")+L": "+
|
||||
engine, langs::get(L"error.pack-not-found")+L": "+
|
||||
util::str2wstr_utf8(error.getPackId())
|
||||
);
|
||||
return false;
|
||||
} catch (const assetload::error& error) {
|
||||
engine.setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(
|
||||
gui->getMenu(), langs::get(L"Assets Load Error", L"menu")+L":\n"+
|
||||
engine, langs::get(L"Assets Load Error", L"menu")+L":\n"+
|
||||
util::str2wstr_utf8(error.what())
|
||||
);
|
||||
return false;
|
||||
} catch (const parsing_error& error) {
|
||||
engine.setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(gui->getMenu(), util::str2wstr_utf8(error.errorLog()));
|
||||
guiutil::alert(engine, util::str2wstr_utf8(error.errorLog()));
|
||||
return false;
|
||||
} catch (const std::runtime_error& error) {
|
||||
engine.setScreen(std::make_shared<MenuScreen>(engine));
|
||||
guiutil::alert(
|
||||
gui->getMenu(), langs::get(L"Content Error", L"menu")+L":\n"+
|
||||
engine, langs::get(L"Content Error", L"menu")+L":\n"+
|
||||
util::str2wstr_utf8(error.what())
|
||||
);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue