diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 98be0bc6..f5bd366c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -632,7 +632,19 @@ void do_input() // Mouse button right else if (event.button.button == SDL_BUTTON_RIGHT) { - popupMenu->showPopup(mx, my); + Being *being; + FloorItem *floorItem; + + if ((being = findNode(mx, my))) { + popupMenu->showPopup(event.button.x, event.button.y, + being); + } else if ((floorItem = find_floor_item_by_id( + find_floor_item_by_cor(mx, my)))) { + popupMenu->showPopup(event.button.x, event.button.y, + floorItem); + } else { + popupMenu->setVisible(false); + } } } |