1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Moved window stack management from GuiHandler to new class

This commit is contained in:
Ivan Savenko
2023-05-16 15:10:26 +03:00
parent ddf22a757d
commit 7838190ef4
40 changed files with 411 additions and 298 deletions

View File

@ -19,6 +19,7 @@
#include "../CPlayerInterface.h"
#include "../adventureMap/AdventureMapInterface.h"
#include "../gui/CGuiHandler.h"
#include "../gui/WindowHandler.h"
#include "../../lib/CConfigHandler.h"
#include "../../lib/CPathfinder.h"
@ -208,7 +209,7 @@ bool MapViewController::isEventVisible(const CGObjectInstance * obj)
if(!LOCPLINT->makingTurn && settings["adventure"]["enemyMoveTime"].Float() < 0)
return false; // enemy move speed set to "hidden/none"
if(GH.topInt() != adventureInt)
if(GH.windows().topInt() != adventureInt)
return false;
if(obj->isVisitable())
@ -225,7 +226,7 @@ bool MapViewController::isEventVisible(const CGHeroInstance * obj, const int3 &
if(!LOCPLINT->makingTurn && settings["adventure"]["enemyMoveTime"].Float() < 0)
return false; // enemy move speed set to "hidden/none"
if(GH.topInt() != adventureInt)
if(GH.windows().topInt() != adventureInt)
return false;
if(context->isVisible(obj->convertToVisitablePos(from)))