mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +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:
@ -20,7 +20,7 @@
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../adventureMap/AdventureMapInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
#include "../render/CAnimation.h"
|
||||
#include "../render/Canvas.h"
|
||||
#include "../render/IImage.h"
|
||||
@ -135,7 +135,7 @@ void MapView::onMapScrolled(const Point & distance)
|
||||
void MapView::onMapSwiped(const Point & viewPosition)
|
||||
{
|
||||
if(settings["adventure"]["smoothDragging"].Bool())
|
||||
swipeHistory.push_back(std::pair<uint32_t, Point>(GH.input().getTicks(), viewPosition));
|
||||
swipeHistory.push_back(std::pair<uint32_t, Point>(ENGINE->input().getTicks(), viewPosition));
|
||||
|
||||
controller->setViewCenter(model->getMapViewCenter() + viewPosition, model->getLevel());
|
||||
}
|
||||
@ -148,7 +148,7 @@ void MapView::postSwipe(uint32_t msPassed)
|
||||
{
|
||||
Point diff = Point(0, 0);
|
||||
std::pair<uint32_t, Point> firstAccepted;
|
||||
uint32_t now = GH.input().getTicks();
|
||||
uint32_t now = ENGINE->input().getTicks();
|
||||
for (auto & x : swipeHistory) {
|
||||
if(now - x.first < postSwipeCatchIntervalMs) { // only the last x ms are caught
|
||||
if(firstAccepted.first == 0)
|
||||
|
Reference in New Issue
Block a user