1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +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

@ -16,6 +16,7 @@
#include "PlayerLocalState.h"
#include "CServerHandler.h"
#include "gui/CGuiHandler.h"
#include "gui/WindowHandler.h"
#include "../lib/NetPacks.h"
#include "ClientNetPackVisitors.h"
#include "../lib/CConfigHandler.h"
@ -100,7 +101,7 @@ void ClientCommandManager::handleGoSoloCommand()
CSH->client->installNewPlayerInterface(CDynLibHandler::getNewAI(AiToGive), elem.first);
}
}
GH.totalRedraw();
GH.windows().totalRedraw();
giveTurn(color);
}
session["aiSolo"].Bool() = !session["aiSolo"].Bool();
@ -141,7 +142,7 @@ void ClientCommandManager::handleControlaiCommand(std::istringstream& singleWord
CSH->client->installNewPlayerInterface(std::make_shared<CPlayerInterface>(elem.first), elem.first);
}
GH.totalRedraw();
GH.windows().totalRedraw();
if(color != PlayerColor::NEUTRAL)
giveTurn(color);
}
@ -170,7 +171,7 @@ void ClientCommandManager::handleSetBattleAICommand(std::istringstream& singleWo
void ClientCommandManager::handleRedrawCommand()
{
GH.totalRedraw();
GH.windows().totalRedraw();
}
void ClientCommandManager::handleScreenCommand()
@ -195,7 +196,7 @@ void ClientCommandManager::handleNotDialogCommand()
void ClientCommandManager::handleGuiCommand()
{
for(const auto & child : GH.listInt)
for(const auto & child : GH.windows().listInt)
{
const auto childPtr = child.get();
if(const CIntObject * obj = dynamic_cast<const CIntObject*>(childPtr))