diff options
author | Matthew Stewart | 2018-02-25 20:26:52 -0500 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | e4c5a34568e38a15dbcd75fcc00f3c34adf4bfaf (patch) | |
tree | bb148164d0d60542ebff61364b5c42e43101a14b /engines/startrek/text.cpp | |
parent | 060d10c463f10077d733a41ad0a827b678e8b15d (diff) | |
download | scummvm-rg350-e4c5a34568e38a15dbcd75fcc00f3c34adf4bfaf.tar.gz scummvm-rg350-e4c5a34568e38a15dbcd75fcc00f3c34adf4bfaf.tar.bz2 scummvm-rg350-e4c5a34568e38a15dbcd75fcc00f3c34adf4bfaf.zip |
STARTREK: Add mouse cursor
Diffstat (limited to 'engines/startrek/text.cpp')
-rw-r--r-- | engines/startrek/text.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/engines/startrek/text.cpp b/engines/startrek/text.cpp index 18a283bde3..08400dce22 100644 --- a/engines/startrek/text.cpp +++ b/engines/startrek/text.cpp @@ -20,6 +20,7 @@ */ #include "common/stream.h" +#include "graphics/cursorman.h" #include "startrek/graphics.h" @@ -86,16 +87,11 @@ int Graphics::showText(TextGetterFunc textGetter, int var, int xoffset, int yoff else { loadMenuButtons("textbtns", xoffset+0x96, yoffset-0x11); - Common::Point oldMousePos = _mousePos; - SharedPtr<Bitmap> oldMouseBitmap = _mouseSprite.bitmap; + Common::Point oldMousePos = getMousePos(); + SharedPtr<Bitmap> oldMouseBitmap = _mouseBitmap; - _mousePos.x = xoffset + 0xde; - _mousePos.y = yoffset - 0x08; - _mouseSprite.pos = _mousePos; - _mouseSprite.drawPriority = 15; - - _mouseSprite.setBitmap(loadBitmap("pushbtn")); - warpMousePosition(_mousePos.x, _mousePos.y); + _vm->_system->warpMouse(xoffset + 0xde, yoffset - 0x08); + setMouseCursor(loadBitmap("pushbtn")); uint16 tmpTextboxVar7 = _textboxVar7; _textboxVar7 = 0; @@ -119,11 +115,8 @@ int Graphics::showText(TextGetterFunc textGetter, int var, int xoffset, int yoff _vm->pollEvents(); } - _mousePos = oldMousePos; - _mouseSprite.pos = _mousePos; - _mouseSprite.drawPriority = 15; - _mouseSprite.setBitmap(oldMouseBitmap); - warpMousePosition(_mousePos.x, _mousePos.y); + setMouseCursor(oldMouseBitmap); + _vm->_system->warpMouse(oldMousePos.x, oldMousePos.y); _textboxVar7 = tmpTextboxVar7; // sub_29326(); @@ -288,8 +281,4 @@ void Graphics::loadMenuButtons(Common::String mnuFilename, int xpos, int ypos) { } } -void Graphics::warpMousePosition(int x, int y) { - // TODO -} - } |