aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-01-04 10:58:27 +0100
committerTorbjörn Andersson2013-01-04 10:58:27 +0100
commit532dd09b21510e100eec65a3fd29c9f507a16e58 (patch)
treeab19537aa9650b6ab82459d91027128b9ca44b45
parentc9a175a8775faf2c6d3593c5b4984b7dbd02ca99 (diff)
downloadscummvm-rg350-532dd09b21510e100eec65a3fd29c9f507a16e58.tar.gz
scummvm-rg350-532dd09b21510e100eec65a3fd29c9f507a16e58.tar.bz2
scummvm-rg350-532dd09b21510e100eec65a3fd29c9f507a16e58.zip
TOLTECS: When a new dialog opens, highlight active item (if any)
We do this by acting as if the mouse just moved to its current position. I first noticed this on the original save/load dialogs.
-rw-r--r--engines/toltecs/menu.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 85cd15b8fa..b52d7dad82 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -328,6 +328,11 @@ void MenuSystem::initMenu(MenuID menuID) {
if ((*iter).enabled)
drawItem((*iter).id, false);
}
+
+ // Check if the mouse is already over an item
+ _currItemID = kItemIdNone;
+ Common::Point mousePos = _vm->_system->getEventManager()->getMousePos();
+ handleMouseMove(mousePos.x, mousePos.y);
}
void MenuSystem::enableItem(ItemID id) {
@@ -335,6 +340,7 @@ void MenuSystem::enableItem(ItemID id) {
if (item) {
item->enabled = true;
drawItem(id, false);
+ _currItemID = kItemIdNone;
Common::Point mousePos = _vm->_system->getEventManager()->getMousePos();
handleMouseMove(mousePos.x, mousePos.y);
}