diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-28 12:32:12 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-07-28 12:32:12 +0000 |
commit | 51b75feaefd132ee0b7992a10dbe79bfa92e6d91 (patch) | |
tree | 91b1d54ae1ec29cc835f7d5198a04115c1874894 /src/gui/inventorywindow.cpp | |
parent | 227aeae87bcca1ecb0183530a4cca1b038863635 (diff) | |
download | mana-client-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.gz mana-client-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.bz2 mana-client-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.xz mana-client-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.zip |
Cleaned up the showPopup() code, moved "map"-related code into game.cpp, made the popup show up at mouse coordinates instead of being aligned to tiles.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r-- | src/gui/inventorywindow.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 377acc1f..28dbd35e 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -25,7 +25,6 @@ #include "popupmenu.h" #include "../playerinfo.h" #include "../inventory.h" -#include "../engine.h" #include "button.h" #include "scrollarea.h" #include "item_amount.h" @@ -148,10 +147,10 @@ void InventoryWindow::mouseClick(int x, int y, int button, int count) { /* * convert relative to the window coordinates to - * absolute tile coordinates + * absolute screen coordinates */ - int mx = (x + getX()) / 32 + camera_x; - int my = (y + getY()) / 32 + camera_y; + int mx = x + getX(); + int my = y + getY(); popupMenu->showPopup(mx, my, item); } } |