summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-28 12:32:12 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-07-28 12:32:12 +0000
commit51b75feaefd132ee0b7992a10dbe79bfa92e6d91 (patch)
tree91b1d54ae1ec29cc835f7d5198a04115c1874894 /src/gui/popupmenu.h
parent227aeae87bcca1ecb0183530a4cca1b038863635 (diff)
downloadmana-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.gz
mana-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.bz2
mana-51b75feaefd132ee0b7992a10dbe79bfa92e6d91.tar.xz
mana-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/popupmenu.h')
-rw-r--r--src/gui/popupmenu.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h
index 45c5c446..f1bebabc 100644
--- a/src/gui/popupmenu.h
+++ b/src/gui/popupmenu.h
@@ -29,6 +29,7 @@
#include "linkhandler.h"
#include "browserbox.h"
#include "../being.h"
+#include "../item.h"
#include "../floor_item.h"
/**
@@ -48,14 +49,21 @@ class PopupMenu : public Window, public LinkHandler
~PopupMenu();
/**
- * Shows the related popup menu specifies by the mouse click coords.
+ * Shows the being related popup menu at the specified mouse coords.
*/
- void showPopup(int mx, int my);
+ void showPopup(int x, int y, Being *being);
+
+ /**
+ * Shows the floor item related popup menu at the specified
+ * mouse coords.
+ */
+ void showPopup(int x, int y, FloorItem *floorItem);
/**
* Shows the related popup menu when right click on the inventory
+ * at the specified mouse coordinates.
*/
- void showPopup(int mx, int my, class Item *item);
+ void showPopup(int x, int y, Item *item);
/**
* Handles link action.
@@ -64,12 +72,16 @@ class PopupMenu : public Window, public LinkHandler
private:
BrowserBox* browserBox;
- int mX, mY;
Being* being;
FloorItem* floorItem;
- class Item *m_item;
+ Item *m_item;
+
+ /**
+ * Shared code for the various showPopup functions.
+ */
+ void showPopup(int x, int y);
};
extern PopupMenu *popupMenu;