aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-12-27 00:43:19 -0500
committerPaul Gilbert2016-12-27 00:43:19 -0500
commiteb7b57b6a8c0a24de046b4fd1dc8bd969f71ad2c (patch)
tree4ef87acd3cbc745b4ab9b868734bbe37c43744d0 /engines/titanic
parent3885bfc752fa132c4a09c41cc1f1bf63fccaa42b (diff)
downloadscummvm-rg350-eb7b57b6a8c0a24de046b4fd1dc8bd969f71ad2c.tar.gz
scummvm-rg350-eb7b57b6a8c0a24de046b4fd1dc8bd969f71ad2c.tar.bz2
scummvm-rg350-eb7b57b6a8c0a24de046b4fd1dc8bd969f71ad2c.zip
TITANIC: Implement busy cursor like the original
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/game_state.cpp4
-rw-r--r--engines/titanic/support/mouse_cursor.cpp8
-rw-r--r--engines/titanic/support/mouse_cursor.h11
3 files changed, 21 insertions, 2 deletions
diff --git a/engines/titanic/game_state.cpp b/engines/titanic/game_state.cpp
index 26a4297358..49779ad745 100644
--- a/engines/titanic/game_state.cpp
+++ b/engines/titanic/game_state.cpp
@@ -83,11 +83,11 @@ void CGameState::setMode(GameStateMode newMode) {
_gameManager->lockInputHandler();
if (sm && sm->_mouseCursor)
- sm->_mouseCursor->hide();
+ sm->_mouseCursor->setBusy();
} else if (newMode != GSMODE_CUTSCENE && _mode == GSMODE_CUTSCENE) {
if (sm && sm->_mouseCursor)
- sm->_mouseCursor->show();
+ sm->_mouseCursor->clearBusy();
if (_gameManager)
_gameManager->unlockInputHandler();
diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp
index 6300f65a3b..c6942510cc 100644
--- a/engines/titanic/support/mouse_cursor.cpp
+++ b/engines/titanic/support/mouse_cursor.cpp
@@ -192,6 +192,14 @@ void CMouseCursor::enableControl() {
CScreenManager::_screenManagerPtr->_inputHandler->decLockCount();
}
+void CMouseCursor::setBusy() {
+ setCursor(CURSOR_HOURGLASS);
+}
+
+void CMouseCursor::clearBusy() {
+ setCursor(CURSOR_ARROW);
+}
+
void CMouseCursor::setPosition(const Point &pt, double duration) {
_moveStartPos = g_vm->_events->getMousePos();
_moveDestPos = pt;
diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h
index 1662ce743d..d61e5fe0bc 100644
--- a/engines/titanic/support/mouse_cursor.h
+++ b/engines/titanic/support/mouse_cursor.h
@@ -144,6 +144,17 @@ public:
void enableControl();
/**
+ * Shows the busy cursor
+ */
+ void setBusy();
+
+ /**
+ * Resets the cursor back to normal
+ */
+ void clearBusy();
+
+
+ /**
* Move the mouse to a new position
*/
void setPosition(const Point &pt, double duration);