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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user