diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-23 12:16:24 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-23 12:16:24 +0000 |
commit | 4bb492c640354a968b77a3d4f9bf0ebfd3a31ba1 (patch) | |
tree | 0f109bfebe8370ed699290336baee532d258a37b /crawl-ref/source/libgui.cc | |
parent | 70d644194b4b010383b4a5a264370e2cb291b693 (diff) | |
download | crawl-ref-4bb492c640354a968b77a3d4f9bf0ebfd3a31ba1.tar.gz crawl-ref-4bb492c640354a968b77a3d4f9bf0ebfd3a31ba1.zip |
[1940326] Fixing bug where the mouse couldn't be used to select items on the inventory/menu/drop screen.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4528 c06c8d41-db1a-0410-9941-cceddc491573
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) |