diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeNew.cpp | 3 | ||||
-rw-r--r-- | gui/newgui.cpp | 8 | ||||
-rw-r--r-- | gui/newgui.h | 1 |
3 files changed, 6 insertions, 6 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index 0ff6b45fa4..ca50e5d11a 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -27,6 +27,7 @@ #include "graphics/imageman.h" #include "graphics/imagedec.h" #include "graphics/colormasks.h" +#include "graphics/cursorman.h" #include "graphics/paletteman.h" #include "common/config-manager.h" @@ -1549,7 +1550,7 @@ OverlayColor ThemeNew::calcDimColor(OverlayColor col) { void ThemeNew::setUpCursor() { PaletteMan.pushCursorPalette(_cursorPal, 0, MAX_CURS_COLORS); - _system->setMouseCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); + CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); } void ThemeNew::createCursor() { diff --git a/gui/newgui.cpp b/gui/newgui.cpp index db45d94e3c..f0d58d8982 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -22,6 +22,7 @@ #include "common/stdafx.h" #include "common/system.h" #include "common/util.h" +#include "graphics/cursorman.h" #include "graphics/paletteman.h" #include "gui/newgui.h" #include "gui/dialog.h" @@ -156,6 +157,7 @@ void NewGui::runLoop() { }; PaletteMan.pushCursorPalette(palette, 0, 4); + CursorMan.pushCursor(NULL, 0, 0, 0, 0); } while (!_dialogStack.empty() && activeDialog == _dialogStack.top()) { @@ -286,8 +288,6 @@ void NewGui::runLoop() { void NewGui::saveState() { // Backup old cursor - _oldCursorMode = _system->showMouse(true); - _currentKeyDown.keycode = 0; _lastClick.x = _lastClick.y = 0; _lastClick.time = 0; @@ -297,7 +297,7 @@ void NewGui::saveState() { } void NewGui::restoreState() { - _system->showMouse(_oldCursorMode); + CursorMan.popCursor(); _system->updateScreen(); @@ -333,7 +333,7 @@ void NewGui::animateCursor() { } } - _system->setMouseCursor(_cursor, 16, 16, 7, 7); + CursorMan.replaceCursor(_cursor, 16, 16, 7, 7); _cursorAnimateTimer = time; _cursorAnimateCounter = (_cursorAnimateCounter + 1) % 4; diff --git a/gui/newgui.h b/gui/newgui.h index 58bdf4715b..055f616131 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -107,7 +107,6 @@ protected: } _lastClick; // mouse cursor state - bool _oldCursorMode; int _cursorAnimateCounter; int _cursorAnimateTimer; byte _cursor[2048]; |