diff options
-rw-r--r-- | engines/titanic/core/view_item.cpp | 13 | ||||
-rw-r--r-- | engines/titanic/support/mouse_cursor.h | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/engines/titanic/core/view_item.cpp b/engines/titanic/core/view_item.cpp index c5cd77874b..098adc0c61 100644 --- a/engines/titanic/core/view_item.cpp +++ b/engines/titanic/core/view_item.cpp @@ -208,14 +208,15 @@ bool CViewItem::handleMessage(CMouseMoveMsg &msg) { } else { // Iterate through each link item, and if any is highlighted, // change the mouse cursor to the designated cursor for the item - CLinkItem *linkItem = dynamic_cast<CLinkItem *>(getFirstChild()); - while (linkItem) { - if (linkItem->_bounds.contains(msg._mousePos)) { + CTreeItem *treeItem = getFirstChild(); + while (treeItem) { + CLinkItem *linkItem = dynamic_cast<CLinkItem *>(treeItem); + if (linkItem && linkItem->_bounds.contains(msg._mousePos)) { screenManager->_mouseCursor->setCursor(linkItem->_cursorId); return true; } - linkItem = dynamic_cast<CLinkItem *>(linkItem->getNextSibling()); + treeItem = treeItem->getNextSibling(); } if (!handleMouseMsg(&msg, false)) @@ -252,10 +253,12 @@ bool CViewItem::handleMouseMsg(CMouseMsg *msg, bool flag) { for (int idx = (int)gameObjects.size() - 1; idx >= 0; ++idx) { if (gameObjects[idx]->_cursorId != CURSOR_ARROW2) { CScreenManager::_screenManagerPtr->_mouseCursor->setCursor(gameObjects[idx]->_cursorId); - return true; + break; } } } + if (gameObjects.size() == 0) + return false; bool result = false; for (int idx = (int)gameObjects.size() - 1; idx >= 0; --idx) { diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 28e13a82c4..831e207632 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -39,7 +39,7 @@ enum CursorId { CURSOR_MOVE_DOWN1 = 6, CURSOR_MOVE_FORWARD2 = 7, CURSOR_HAND = 8, - CURSOR_STAR = 9, + CURSOR_ACTIVATE = 9, CURSOR_INVALID = 10, CURSOR_MAGNIFIER = 11, CURSOR_ARROW2 = 12, |