aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-06 20:32:18 -0400
committerPaul Gilbert2016-04-06 20:32:18 -0400
commite728e901d02aca51858f91ac29b1a177e5e80a07 (patch)
tree9c7f83f4c9219a997cc59bec783630c4b07fc623 /engines/titanic
parentac59f58c8a65e9e27a696da4536693c7d6ec6bc9 (diff)
downloadscummvm-rg350-e728e901d02aca51858f91ac29b1a177e5e80a07.tar.gz
scummvm-rg350-e728e901d02aca51858f91ac29b1a177e5e80a07.tar.bz2
scummvm-rg350-e728e901d02aca51858f91ac29b1a177e5e80a07.zip
TITANIC: Fix for showing link cursors in some screens
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/view_item.cpp13
-rw-r--r--engines/titanic/support/mouse_cursor.h2
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,