diff options
author | Torbjörn Andersson | 2004-01-07 19:03:30 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-01-07 19:03:30 +0000 |
commit | 821bbed1e052205746d9bc2118120a7d31a2a2a1 (patch) | |
tree | 9a06e6d2008ec03d744db0c1ccc2952d56dcf46b /sword1/mouse.cpp | |
parent | 8e30afd4386ad13730e9697959515a1bab3cf975 (diff) | |
download | scummvm-rg350-821bbed1e052205746d9bc2118120a7d31a2a2a1.tar.gz scummvm-rg350-821bbed1e052205746d9bc2118120a7d31a2a2a1.tar.bz2 scummvm-rg350-821bbed1e052205746d9bc2118120a7d31a2a2a1.zip |
Tried to make the menus behave a bit more like the original. Perhaps most
noticeably:
* It no longer matters where you release the mouse button when talking to
someone. It uses whatever topic you selected on mouse-down.
* The inventory menu doesn't vanish if you're holding an object, even if
you move the pointer away from it.
* When using an object on a character (to talk to him about it), the top
menu fades away, rather than vanishing instantly.
Ok, that last change is rather non-obvious, but it does obsolete the
clearMenu() function, which has therefore been removed.
svn-id: r12222
Diffstat (limited to 'sword1/mouse.cpp')
-rw-r--r-- | sword1/mouse.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sword1/mouse.cpp b/sword1/mouse.cpp index d455a17584..a42214ffc8 100644 --- a/sword1/mouse.cpp +++ b/sword1/mouse.cpp @@ -104,13 +104,15 @@ void SwordMouse::engine(uint16 x, uint16 y, uint16 eventFlags) { if (!SwordLogic::_scriptVars[TOP_MENU_DISABLED]) { if (y < 40) { // okay, we are in the top menu. if (!_inTopMenu) { // are we just entering it? - _menu->fnStartMenu(); + if (!SwordLogic::_scriptVars[OBJECT_HELD]) + _menu->fnStartMenu(); setPointer(MSE_POINTER, 0); } _menu->checkTopMenu(); _inTopMenu = true; } else if (_inTopMenu) { // we're not in the menu. did we just leave it? - _menu->fnEndMenu(); + if (!SwordLogic::_scriptVars[OBJECT_HELD]) + _menu->fnEndMenu(); _inTopMenu = false; } } else if (_inTopMenu) { @@ -144,7 +146,7 @@ void SwordMouse::engine(uint16 x, uint16 y, uint16 eventFlags) { _getOff = 0; } if (touchedId) { // there's something new selected, now. - if (_objList[clicked].compact->o_mouse_on) //run its get on + if (_objList[clicked].compact->o_mouse_on) //run its get on _logic->runMouseScript(_objList[clicked].compact, _objList[clicked].compact->o_mouse_on); _getOff = _objList[clicked].compact->o_mouse_off; //setup get-off for later |