|
@@ -21,13 +21,6 @@
|
|
|
|
|
|
#include "../../lib/CConfigHandler.h"
|
|
|
|
|
|
-#include <SDL_render.h>
|
|
|
-#include <SDL_events.h>
|
|
|
-
|
|
|
-#ifdef VCMI_APPLE
|
|
|
-#include <dispatch/dispatch.h>
|
|
|
-#endif
|
|
|
-
|
|
|
std::unique_ptr<ICursor> CursorHandler::createCursor()
|
|
|
{
|
|
|
if (settings["video"]["cursor"].String() == "auto")
|
|
@@ -254,18 +247,6 @@ std::shared_ptr<IImage> CursorHandler::getCurrentImage()
|
|
|
return cursors[static_cast<size_t>(type)]->getImage(frame);
|
|
|
}
|
|
|
|
|
|
-void CursorHandler::centerCursor()
|
|
|
-{
|
|
|
- Point screenSize {screen->w, screen->h};
|
|
|
- pos = screenSize / 2 - getPivotOffset();
|
|
|
-
|
|
|
- SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
|
|
|
- GH.moveCursorToPosition(pos);
|
|
|
- SDL_EventState(SDL_MOUSEMOTION, SDL_ENABLE);
|
|
|
-
|
|
|
- cursor->setCursorPosition(pos);
|
|
|
-}
|
|
|
-
|
|
|
void CursorHandler::updateSpellcastCursor()
|
|
|
{
|
|
|
static const float frameDisplayDuration = 0.1f; // H3 uses 100 ms per frame
|