diff options
Diffstat (limited to 'crawl-ref/source/libgui.cc')
-rw-r--r-- | crawl-ref/source/libgui.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index 5e8895d515..c1c6a7ce6c 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -1720,11 +1720,20 @@ static int _handle_mouse_button(int mx, int my, int button, toggle_telescope = false; } - // item clicked - if (mode == REGION_INV1 || mode == REGION_INV2) + if (mode == REGION_INV2) { int ix = TileInvIdx(cx); + int key = itemlist_key[cx]; + if (ix != -1 && key) + return key; + else + return 0; + } + // item clicked + if (mode == REGION_INV1) + { + int ix = TileInvIdx(cx); if (ix != -1) { if (button == 2) |