mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Merge branch 'develop' into any-hex-shooting
This commit is contained in:
@ -171,10 +171,11 @@ void CPlayerInterface::initGameInterface(std::shared_ptr<Environment> ENV, std::
|
||||
void CPlayerInterface::closeAllDialogs()
|
||||
{
|
||||
// remove all active dialogs that do not expect query answer
|
||||
for (;;)
|
||||
while(true)
|
||||
{
|
||||
auto adventureWindow = GH.windows().topWindow<AdventureMapInterface>();
|
||||
auto infoWindow = GH.windows().topWindow<CInfoWindow>();
|
||||
auto topWindow = GH.windows().topWindow<WindowBase>();
|
||||
|
||||
if(adventureWindow != nullptr)
|
||||
break;
|
||||
@ -182,16 +183,8 @@ void CPlayerInterface::closeAllDialogs()
|
||||
if(infoWindow && infoWindow->ID != QueryID::NONE)
|
||||
break;
|
||||
|
||||
if (infoWindow)
|
||||
infoWindow->close();
|
||||
else
|
||||
GH.windows().popWindows(1);
|
||||
topWindow->close();
|
||||
}
|
||||
|
||||
if(castleInt)
|
||||
castleInt->close();
|
||||
|
||||
castleInt = nullptr;
|
||||
}
|
||||
|
||||
void CPlayerInterface::playerEndsTurn(PlayerColor player)
|
||||
@ -1460,6 +1453,7 @@ void CPlayerInterface::playerBlocked(int reason, bool start)
|
||||
cmp.push_back(std::make_shared<CComponent>(ComponentType::FLAG, playerID));
|
||||
makingTurn = true; //workaround for stiff showInfoDialog implementation
|
||||
showInfoDialog(msg, cmp);
|
||||
waitWhileDialog();
|
||||
makingTurn = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user