aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorRobert Göffringmann2004-01-02 02:38:01 +0000
committerRobert Göffringmann2004-01-02 02:38:01 +0000
commit315dc0238ce60f1c5216ecd3622bd10d093a8656 (patch)
tree712f019f9c01c26df74b67f5596cbd3c42c1a0c1 /sword1
parent635239d9668b49dea9414b26db78c36a12e4c063 (diff)
downloadscummvm-rg350-315dc0238ce60f1c5216ecd3622bd10d093a8656.tar.gz
scummvm-rg350-315dc0238ce60f1c5216ecd3622bd10d093a8656.tar.bz2
scummvm-rg350-315dc0238ce60f1c5216ecd3622bd10d093a8656.zip
another change in the clicking checks
svn-id: r12078
Diffstat (limited to 'sword1')
-rw-r--r--sword1/menu.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/sword1/menu.cpp b/sword1/menu.cpp
index 6ea311b4d5..5e9aa6560c 100644
--- a/sword1/menu.cpp
+++ b/sword1/menu.cpp
@@ -130,8 +130,7 @@ uint8 SwordMenu::checkMenuClick(uint8 menuType) {
SwordLogic::_scriptVars[MENU_LOOKING] = 1;
SwordLogic::_scriptVars[DEFAULT_ICON_TEXT] = _objectDefs[_menuList[cnt]].textDesc;
refreshMenus = true;
- }
- if (mouseEvent & BS1L_BUTTON_DOWN) {
+ } else if (mouseEvent & BS1L_BUTTON_DOWN) {
if (SwordLogic::_scriptVars[OBJECT_HELD]) {
if (SwordLogic::_scriptVars[OBJECT_HELD] == _menuList[cnt]) {
_mouse->setLuggage(0, 0);
@@ -139,19 +138,14 @@ uint8 SwordMenu::checkMenuClick(uint8 menuType) {
} else { // the player is clicking another item on this one.
// run its use-script, if there is one
SwordLogic::_scriptVars[SECOND_ITEM] = _menuList[cnt];
+ _mouse->setLuggage(0, 0);
}
- } else
+ } else {
SwordLogic::_scriptVars[OBJECT_HELD] = _menuList[cnt];
- refreshMenus = true;
- } else if (mouseEvent & BS1L_BUTTON_UP) {
- if (SwordLogic::_scriptVars[OBJECT_HELD] == _menuList[cnt]) {
_mouse->setLuggage(_objectDefs[_menuList[cnt]].luggageIconRes, 0);
return cnt + 1;
- } else {
- _mouse->setLuggage(0, 0);
- SwordLogic::_scriptVars[OBJECT_HELD] = 0;
- refreshMenus = true;
}
+ refreshMenus = true;
}
}
}