mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Added methods for push/pop cursors
svn-id: r24069
This commit is contained in:
parent
6201707122
commit
e8623fa477
@ -97,6 +97,28 @@ void Mouse::setCursorNum(uint8 cursorNum, int hotspotX, int hotspotY) {
|
||||
CursorMan.replaceCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
|
||||
}
|
||||
|
||||
void Mouse::pushCursorNum(uint8 cursorNum) {
|
||||
int hotspotX = 7, hotspotY = 7;
|
||||
if ((cursorNum == CURSOR_ARROW) || (cursorNum == CURSOR_MENUBAR)) {
|
||||
hotspotX = 0;
|
||||
hotspotY = 0;
|
||||
}
|
||||
|
||||
pushCursorNum(cursorNum, hotspotX, hotspotY);
|
||||
}
|
||||
|
||||
void Mouse::pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY) {
|
||||
Resources &res = Resources::getReference();
|
||||
|
||||
_cursorNum = cursorNum;
|
||||
byte *cursorAddr = res.getCursor(cursorNum);
|
||||
CursorMan.pushCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
|
||||
}
|
||||
|
||||
void Mouse::popCursor() {
|
||||
CursorMan.popCursor();
|
||||
}
|
||||
|
||||
void Mouse::setPosition(int newX, int newY) {
|
||||
System::getReference().warpMouse(newX, newY);
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ public:
|
||||
bool lButton() { return _lButton; }
|
||||
bool rButton() { return _rButton; }
|
||||
void waitForRelease();
|
||||
void pushCursorNum(uint8 cursorNum);
|
||||
void pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY);
|
||||
void popCursor();
|
||||
};
|
||||
|
||||
class Events {
|
||||
|
Loading…
Reference in New Issue
Block a user