1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +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

@@ -14,7 +14,7 @@
#include "TextControls.h"
#include "../eventsSDL/InputHandler.h"
#include "../gui/CGuiHandler.h"
#include "../GameEngine.h"
#include "../gui/WindowHandler.h"
#include "../render/IImage.h"
#include "../CGameInfo.h"
@@ -120,15 +120,15 @@ void RadialMenu::gesturePanning(const Point & initialPosition, const Point & cur
if (newSelection)
{
GH.statusbar()->write(newSelection->hoverText);
ENGINE->statusbar()->write(newSelection->hoverText);
newSelection->setSelected(true);
}
else
GH.statusbar()->clear();
ENGINE->statusbar()->clear();
selectedItem = newSelection;
GH.windows().totalRedraw();
ENGINE->windows().totalRedraw();
}
}
@@ -140,10 +140,10 @@ void RadialMenu::gesture(bool on, const Point & initialPosition, const Point & f
auto item = findNearestItem(finalPosition);
// we need to close this window first so if action spawns a new window it won't be closed instead
GH.windows().popWindows(1);
ENGINE->windows().popWindows(1);
if (item)
{
GH.input().hapticFeedback();
ENGINE->input().hapticFeedback();
item->callback();
}
}