From 1f8066c333e24d0abc3c552b8ef517109058dff6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 30 Jul 2006 12:15:52 +0000 Subject: Added proper item selection handling for the ASK action svn-id: r23632 --- engines/lure/game.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'engines/lure') 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)"); -- cgit v1.2.3