diff options
author | Paul Gilbert | 2006-07-30 12:15:52 +0000 |
---|---|---|
committer | Paul Gilbert | 2006-07-30 12:15:52 +0000 |
commit | 1f8066c333e24d0abc3c552b8ef517109058dff6 (patch) | |
tree | e694444694cd2050f66f25415955e1e7bffc9771 /engines/lure | |
parent | 0849e46541895e9f7e4fe597f2dd3dcf931ef479 (diff) | |
download | scummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.tar.gz scummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.tar.bz2 scummvm-rg350-1f8066c333e24d0abc3c552b8ef517109058dff6.zip |
Added proper item selection handling for the ASK action
svn-id: r23632
Diffstat (limited to 'engines/lure')
-rw-r--r-- | engines/lure/game.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index 33d1c79866..0f83089b19 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -348,15 +348,22 @@ void Game::handleRightClickMenu() { breakFlag = true; break; + case ASK: + hotspot = res.getHotspot(room.hotspotId()); + strings.getString(hotspot->nameId, statusLine); + strcat(statusLine, " for "); + statusLine += strlen(statusLine); + + itemId = PopupMenu::ShowItems(GET); + breakFlag = ((itemId != 0xffff) && (itemId != 0xfffe)); + if (breakFlag) + hotspot = res.getHotspot(itemId); + break; + case GIVE: case USE: case EXAMINE: case DRINK: - if (action == ASK) { - strings.getString(hotspot->nameId, statusLine); - strcat(statusLine, " for "); - } - hasItems = (res.numInventoryItems() != 0); if (!hasItems) strcat(statusLine, "(nothing)"); |