FULLPIPE: Implement CInputController::setCursor()

This commit is contained in:
Eugene Sandulenko 2013-08-24 22:23:31 +03:00
parent ee18a54554
commit 3d3ebc6ae7
2 changed files with 12 additions and 3 deletions

View File

@ -86,8 +86,17 @@ void CInputController::drawCursor(int x, int y) {
warning("STUB: CInputController::drawCursor(%d, %d)", x, y);
}
void CInputController::setCursor(int id) {
warning("STUB: CInputController::setCursor(%d)", id);
void CInputController::setCursor(int cursorId) {
if (_cursorIndex == -1 || _cursorsArray[_cursorIndex]->pictureId != cursorId) {
_cursorIndex = -1;
for (uint i = 0; i < _cursorsArray.size(); i++) {
if (_cursorsArray[i]->pictureId == cursorId) {
_cursorIndex = i;
break;
}
}
}
}
CursorInfo::CursorInfo() {

View File

@ -56,7 +56,7 @@ class CInputController {
int _cursorIndex;
CursorsArray _cursorsArray;
Common::Rect _cursorBounds;
int _cursorItemPicture;
Picture *_cursorItemPicture;
public:
CInputController();