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

Renamed CGuiHandler to GameEngine

- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
This commit is contained in:
Ivan Savenko
2025-02-10 21:49:23 +00:00
parent 0c5a560c80
commit cacceda950
144 changed files with 1019 additions and 1021 deletions

View File

@ -21,7 +21,7 @@
#include "../render/IRenderHandler.h"
#include "../render/Graphics.h"
#include "../gui/TextAlignment.h"
#include "../gui/CGuiHandler.h"
#include "../GameEngine.h"
MapOverlayLogVisualizer::MapOverlayLogVisualizer(Canvas & target, std::shared_ptr<MapViewModel> model)
@ -36,7 +36,7 @@ void MapOverlayLogVisualizer::drawLine(int3 start, int3 end)
if(start.z != level || end.z != level)
return;
int scaling = GH.screenHandler().getScalingFactor();
int scaling = ENGINE->screenHandler().getScalingFactor();
auto pStart = model->getTargetTileArea(start).center();
auto pEnd = model->getTargetTileArea(end).center();
Rect viewPortRaw = target.getRenderArea();
@ -77,7 +77,7 @@ void MapOverlayLogVisualizer::drawText(
if(viewPort.isInside(pStart))
{
const auto & font = GH.renderHandler().loadFont(FONT_TINY);
const auto & font = ENGINE->renderHandler().loadFont(FONT_TINY);
int w = font->getStringWidth(text);
int h = font->getLineHeight();