|
@@ -171,10 +171,11 @@ void CPlayerInterface::initGameInterface(std::shared_ptr<Environment> ENV, std::
|
|
void CPlayerInterface::closeAllDialogs()
|
|
void CPlayerInterface::closeAllDialogs()
|
|
{
|
|
{
|
|
// remove all active dialogs that do not expect query answer
|
|
// remove all active dialogs that do not expect query answer
|
|
- for (;;)
|
|
|
|
|
|
+ while(true)
|
|
{
|
|
{
|
|
auto adventureWindow = GH.windows().topWindow<AdventureMapInterface>();
|
|
auto adventureWindow = GH.windows().topWindow<AdventureMapInterface>();
|
|
auto infoWindow = GH.windows().topWindow<CInfoWindow>();
|
|
auto infoWindow = GH.windows().topWindow<CInfoWindow>();
|
|
|
|
+ auto topWindow = GH.windows().topWindow<WindowBase>();
|
|
|
|
|
|
if(adventureWindow != nullptr)
|
|
if(adventureWindow != nullptr)
|
|
break;
|
|
break;
|
|
@@ -182,16 +183,8 @@ void CPlayerInterface::closeAllDialogs()
|
|
if(infoWindow && infoWindow->ID != QueryID::NONE)
|
|
if(infoWindow && infoWindow->ID != QueryID::NONE)
|
|
break;
|
|
break;
|
|
|
|
|
|
- if (infoWindow)
|
|
|
|
- infoWindow->close();
|
|
|
|
- else
|
|
|
|
- GH.windows().popWindows(1);
|
|
|
|
|
|
+ topWindow->close();
|
|
}
|
|
}
|
|
-
|
|
|
|
- if(castleInt)
|
|
|
|
- castleInt->close();
|
|
|
|
-
|
|
|
|
- castleInt = nullptr;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
void CPlayerInterface::playerEndsTurn(PlayerColor player)
|
|
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));
|
|
cmp.push_back(std::make_shared<CComponent>(ComponentType::FLAG, playerID));
|
|
makingTurn = true; //workaround for stiff showInfoDialog implementation
|
|
makingTurn = true; //workaround for stiff showInfoDialog implementation
|
|
showInfoDialog(msg, cmp);
|
|
showInfoDialog(msg, cmp);
|
|
|
|
+ waitWhileDialog();
|
|
makingTurn = false;
|
|
makingTurn = false;
|
|
}
|
|
}
|
|
}
|
|
}
|