summaryrefslogtreecommitdiff
path: root/src/gui/gui.h
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-12-29 02:59:30 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-12-29 02:59:30 +0000
commit41101dbd7f38c7e9898422c755b8eaf379f1d7c1 (patch)
tree6d8f60024c355d15b3a42a7c0340c53d1859a910 /src/gui/gui.h
parent83ff9b3685fbf239772095b829e9c233e7907b3b (diff)
downloadmana-41101dbd7f38c7e9898422c755b8eaf379f1d7c1.tar.gz
mana-41101dbd7f38c7e9898422c755b8eaf379f1d7c1.tar.bz2
mana-41101dbd7f38c7e9898422c755b8eaf379f1d7c1.tar.xz
mana-41101dbd7f38c7e9898422c755b8eaf379f1d7c1.zip
Added popup support to the Gui class. Moved all mouse input handling into the Gui class.
Diffstat (limited to 'src/gui/gui.h')
-rw-r--r--src/gui/gui.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 238ee38e..83f731db 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -29,9 +29,13 @@
#include "../guichanfwd.h"
+class Being;
+class FloorItem;
class GuiConfigListener;
class Graphics;
class Image;
+class Item;
+class PopupMenu;
class WindowContainer;
/**
@@ -92,10 +96,22 @@ class Gui : public gcn::Gui, public gcn::MouseListener
setUseCustomCursor(bool customCursor);
/**
- * ConfigListener method.
+ * Shows a popup for an item
+ * TODO Find some way to get rid of Item here
*/
- void
- optionChanged(const std::string &name);
+ void showPopup(int x, int y, Item *item);
+
+ /**
+ * Shows a popup for a floor item
+ * TODO Find some way to get rid of FloorItem here
+ */
+ void showPopup(int x, int y, FloorItem *floorItem);
+
+ /**
+ * Shows a popup for a being
+ * TODO Find some way to get rid of Being here
+ */
+ void showPopup(int x, int y, Being *being);
private:
GuiConfigListener *mConfigListener;
@@ -104,6 +120,9 @@ class Gui : public gcn::Gui, public gcn::MouseListener
gcn::Font *mGuiFont; /**< The global GUI font */
Image *mMouseCursor; /**< Mouse cursor image */
bool mCustomCursor; /**< Show custom cursor */
+
+ PopupMenu *mPopup; /**< Popup window */
+ bool mPopupActive;
};
extern Gui *gui; /**< The GUI system */