summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-06-16 08:30:34 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-06-16 08:30:34 +0000
commit8d801b2c43f7dfd0b279bb263480d38f5694ac06 (patch)
tree82b3382ad67d297373cec74a74d7db60b3dd4def /src/gui
parent06afc063b8538b90b8dd8eb662a9ae0e11812963 (diff)
downloadmana-8d801b2c43f7dfd0b279bb263480d38f5694ac06.tar.gz
mana-8d801b2c43f7dfd0b279bb263480d38f5694ac06.tar.bz2
mana-8d801b2c43f7dfd0b279bb263480d38f5694ac06.tar.xz
mana-8d801b2c43f7dfd0b279bb263480d38f5694ac06.zip
Added action menu (moved trading to menu)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/menu.cpp14
-rw-r--r--src/gui/menu.h13
2 files changed, 23 insertions, 4 deletions
diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp
index 9c648db4..d8b2e6de 100644
--- a/src/gui/menu.cpp
+++ b/src/gui/menu.cpp
@@ -23,8 +23,8 @@
#include "menu.h"
-Menu::Menu(const std::string& menulabel, std::vector<MenuItem *> items):
- Window(menulabel)
+Menu::Menu(std::vector<MenuItem *> items):
+ Window("")
{
setContentSize(52,60);
fill(items);
@@ -52,3 +52,13 @@ void Menu::fill(std::vector<MenuItem *> items)
resizeToContent();
}
+void Menu::setBeing(Being *target)
+{
+ where = target;
+}
+
+Being * Menu::getBeing()
+{
+ return where;
+}
+
diff --git a/src/gui/menu.h b/src/gui/menu.h
index 5d905c86..040c9a9d 100644
--- a/src/gui/menu.h
+++ b/src/gui/menu.h
@@ -25,15 +25,16 @@
#define _TMW_MENU_H
#include <guichan.hpp>
-#include "menuitem.h"
#include "window.h"
+#include "menuitem.h"
+#include "../being.h"
class Menu : public Window {
public:
/**
* Constructor.
*/
- Menu(const std::string& menulabel, std::vector<MenuItem *> items);
+ Menu(std::vector<MenuItem *> items);
/**
* Destructor.
@@ -45,6 +46,14 @@ class Menu : public Window {
*/
void fill(std::vector<MenuItem *> items);
+ /**
+ * Set/get begin
+ */
+ void setBeing(Being *target);
+ Being * getBeing(void);
+
+ private:
+ Being *where; // Where to display
};
#endif /* _TMW_MENU_H */