mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-07 00:58:39 +02:00
Moved shutdown request dialog handling to GameInstance
This commit is contained in:
@ -64,14 +64,6 @@
|
||||
|
||||
ISelectionScreenInfo * SEL = nullptr;
|
||||
|
||||
static void do_quit()
|
||||
{
|
||||
ENGINE->dispatchMainThread([]()
|
||||
{
|
||||
handleQuit(false);
|
||||
});
|
||||
}
|
||||
|
||||
CMenuScreen::CMenuScreen(const JsonNode & configNode)
|
||||
: CWindowObject(BORDERED), config(configNode)
|
||||
{
|
||||
@ -210,7 +202,7 @@ static std::function<void()> genCommand(CMenuScreen * menu, std::vector<std::str
|
||||
break;
|
||||
case 4: //exit
|
||||
{
|
||||
return []() { CInfoWindow::showYesNoDialog(LIBRARY->generaltexth->allTexts[69], std::vector<std::shared_ptr<CComponent>>(), do_quit, 0, PlayerColor(1)); };
|
||||
return []() { CInfoWindow::showYesNoDialog(LIBRARY->generaltexth->allTexts[69], std::vector<std::shared_ptr<CComponent>>(), [](){GAME->onShutdownRequested(false);}, 0, PlayerColor(1)); };
|
||||
}
|
||||
break;
|
||||
case 5: //highscores
|
||||
|
Reference in New Issue
Block a user