TSAGE: Implement R2R 2 parameter versions of Player disableControl and enableControl

This commit is contained in:
Paul Gilbert 2011-12-22 21:12:08 +11:00
parent 0319cd06ef
commit b5e5328184
2 changed files with 17 additions and 3 deletions

View File

@ -3073,9 +3073,22 @@ void Player::enableControl() {
}
}
void Player::enableControl(CursorType cursor) {
void Player::disableControl(CursorType cursorId, CursorType objectId) {
if (cursorId != -1)
R2_GLOBALS._events.setCursor(cursorId);
else if (objectId != CURSOR_NONE)
R2_GLOBALS._events.setCursor(objectId);
disableControl();
}
void Player::enableControl(CursorType cursorId, CursorType objectId) {
enableControl();
R2_GLOBALS._events.setCursor(cursor);
if (cursorId != -1)
R2_GLOBALS._events.setCursor(cursorId);
else if (objectId != CURSOR_NONE)
R2_GLOBALS._events.setCursor(objectId);
}
void Player::process(Event &event) {

View File

@ -646,7 +646,8 @@ public:
void disableControl();
void enableControl();
void enableControl(CursorType cursor);
void disableControl(CursorType cursorId, CursorType objectId);
void enableControl(CursorType cursorId, CursorType objectId = CURSOR_NONE);
};
/*--------------------------------------------------------------------------*/