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

@ -13,7 +13,7 @@
#include "../lobby/SelectionTab.h"
#include "../gui/CGuiHandler.h"
#include "../GameEngine.h"
#include "../gui/WindowHandler.h"
#include "../widgets/CComponent.h"
#include "../widgets/MiscWidgets.h"
@ -51,7 +51,7 @@ CMapOverview::CMapOverview(const std::string & mapName, const std::string & file
updateShadow();
center(GH.getCursorPosition()); //center on mouse
center(ENGINE->getCursorPosition()); //center on mouse
#ifdef VCMI_MOBILE
moveBy({0, -pos.h / 2});
#endif
@ -60,7 +60,7 @@ CMapOverview::CMapOverview(const std::string & mapName, const std::string & file
std::shared_ptr<CanvasImage> CMapOverviewWidget::createMinimapForLayer(std::unique_ptr<CMap> & map, int layer) const
{
auto canvasImage = GH.renderHandler().createImage(Point(map->width, map->height), CanvasScalingPolicy::IGNORE);
auto canvasImage = ENGINE->renderHandler().createImage(Point(map->width, map->height), CanvasScalingPolicy::IGNORE);
auto canvas = canvasImage->getCanvas();
for (int y = 0; y < map->height; ++y)