summaryrefslogtreecommitdiff
path: root/src/gui/menu.cpp
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-21 08:48:54 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-05-21 08:48:54 +0000
commitb89398608993f2e50b7c7edd8aabe7cb1c1c216b (patch)
treeba71bfec8ce7fc3955f58bd24da702f86325528e /src/gui/menu.cpp
parent77436e727119ae4d762d426efcd1d84748f9edea (diff)
downloadmana-client-b89398608993f2e50b7c7edd8aabe7cb1c1c216b.tar.gz
mana-client-b89398608993f2e50b7c7edd8aabe7cb1c1c216b.tar.bz2
mana-client-b89398608993f2e50b7c7edd8aabe7cb1c1c216b.tar.xz
mana-client-b89398608993f2e50b7c7edd8aabe7cb1c1c216b.zip
Fixed menu so it is working..
Diffstat (limited to 'src/gui/menu.cpp')
-rw-r--r--src/gui/menu.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp
index 74721d09..8018b561 100644
--- a/src/gui/menu.cpp
+++ b/src/gui/menu.cpp
@@ -23,10 +23,10 @@
#include "menu.h"
-Menu::Menu(const std::string& menulabel, std::vector<MenuItem>& items):
+Menu::Menu(const std::string& menulabel, std::vector<MenuItem *> items):
Window(menulabel)
{
- setContentSize(40,60);
+ setContentSize(52,60);
fill(items);
}
@@ -34,12 +34,19 @@ Menu::~Menu()
{
}
-void Menu::fill(std::vector<MenuItem>& items)
+void Menu::fill(std::vector<MenuItem *> items)
{
- for(std::vector<MenuItem>::iterator item = items.begin();
+ int i=0;
+
+ for(std::vector<MenuItem *>::iterator item = items.begin();
item != items.end(); ++item)
{
- item->setPosition(0,0);
- add(&*item);
+ MenuItem *optr;
+ optr = *item;
+ optr->setSize(50,10);
+ optr->setPosition(0,i);
+ i=i+10;
+ add(*item);
}
}
+