diff options
Diffstat (limited to 'engines/tsage/events.cpp')
-rw-r--r-- | engines/tsage/events.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp index 44c79bd2fe..a6471dc8ab 100644 --- a/engines/tsage/events.cpp +++ b/engines/tsage/events.cpp @@ -270,6 +270,17 @@ void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Com _currentCursor = cursorId; } +void EventsClass::setCursor(GfxSurface &cursor) { + // TODO: Find proper parameters for this form in Blue Force + Graphics::Surface s = cursor.lockSurface(); + + const byte *cursorData = (const byte *)s.getBasePtr(0, 0); + CursorMan.replaceCursor(cursorData, cursor.getBounds().width(), cursor.getBounds().height(), + cursor._centroid.x, cursor._centroid.y, cursor._transColor); + + _currentCursor = CURSOR_NONE; +} + void EventsClass::setCursorFromFlag() { setCursor(isCursorVisible() ? _currentCursor : CURSOR_NONE); } @@ -278,8 +289,10 @@ void EventsClass::showCursor() { setCursor(_currentCursor); } -void EventsClass::hideCursor() { +CursorType EventsClass::hideCursor() { + CursorType oldCursor = _currentCursor; setCursor(CURSOR_NONE); + return oldCursor; } bool EventsClass::isCursorVisible() const { |