1
0
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:
Dydzio
2024-09-23 16:57:27 +02:00
32 changed files with 508 additions and 335 deletions

View File

@ -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;
}
}