mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +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:
@ -10,7 +10,7 @@
|
||||
#include "StdInc.h"
|
||||
#include "Canvas.h"
|
||||
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
#include "../media/IVideoPlayer.h"
|
||||
#include "../render/IRenderHandler.h"
|
||||
#include "../render/IScreenHandler.h"
|
||||
@ -67,7 +67,7 @@ int Canvas::getScalingFactor() const
|
||||
{
|
||||
if (scalingPolicy == CanvasScalingPolicy::IGNORE)
|
||||
return 1;
|
||||
return GH.screenHandler().getScalingFactor();
|
||||
return ENGINE->screenHandler().getScalingFactor();
|
||||
}
|
||||
|
||||
Point Canvas::transformPos(const Point & input)
|
||||
@ -181,7 +181,7 @@ void Canvas::drawBorderDashed(const Rect & target, const ColorRGBA & color)
|
||||
|
||||
void Canvas::drawText(const Point & position, const EFonts & font, const ColorRGBA & colorDest, ETextAlignment alignment, const std::string & text )
|
||||
{
|
||||
const auto & fontPtr = GH.renderHandler().loadFont(font);
|
||||
const auto & fontPtr = ENGINE->renderHandler().loadFont(font);
|
||||
|
||||
switch (alignment)
|
||||
{
|
||||
@ -194,7 +194,7 @@ void Canvas::drawText(const Point & position, const EFonts & font, const ColorRG
|
||||
|
||||
void Canvas::drawText(const Point & position, const EFonts & font, const ColorRGBA & colorDest, ETextAlignment alignment, const std::vector<std::string> & text )
|
||||
{
|
||||
const auto & fontPtr = GH.renderHandler().loadFont(font);
|
||||
const auto & fontPtr = ENGINE->renderHandler().loadFont(font);
|
||||
|
||||
switch (alignment)
|
||||
{
|
||||
@ -241,7 +241,7 @@ Rect Canvas::getRenderArea() const
|
||||
CanvasClipRectGuard::CanvasClipRectGuard(Canvas & canvas, const Rect & rect): surf(canvas.surface)
|
||||
{
|
||||
CSDL_Ext::getClipRect(surf, oldRect);
|
||||
CSDL_Ext::setClipRect(surf, rect * GH.screenHandler().getScalingFactor());
|
||||
CSDL_Ext::setClipRect(surf, rect * ENGINE->screenHandler().getScalingFactor());
|
||||
}
|
||||
|
||||
CanvasClipRectGuard::~CanvasClipRectGuard()
|
||||
|
Reference in New Issue
Block a user