diff options
author | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-05-17 08:45:55 +0000 |
---|---|---|
committer | Mateusz Kaduk <mateusz.kaduk@gmail.com> | 2005-05-17 08:45:55 +0000 |
commit | 3fc2cd109a51e6a38783eb5438098d9a962bc655 (patch) | |
tree | 0c18618ac4d6ac58e9cad8d9a7a8ff47f7a3d342 /src/gui/menu.cpp | |
parent | 84fd76cd43e2d7c8e647e78eabc47279cfade973 (diff) | |
download | mana-client-3fc2cd109a51e6a38783eb5438098d9a962bc655.tar.gz mana-client-3fc2cd109a51e6a38783eb5438098d9a962bc655.tar.bz2 mana-client-3fc2cd109a51e6a38783eb5438098d9a962bc655.tar.xz mana-client-3fc2cd109a51e6a38783eb5438098d9a962bc655.zip |
Alt+m for testing menu, menuitems the same as button
Diffstat (limited to 'src/gui/menu.cpp')
-rw-r--r-- | src/gui/menu.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index c74ca5ea..74721d09 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -23,8 +23,23 @@ #include "menu.h" -Menu::Menu(const std::vector<MenuItem>& items) +Menu::Menu(const std::string& menulabel, std::vector<MenuItem>& items): + Window(menulabel) { + setContentSize(40,60); + fill(items); +} +Menu::~Menu() +{ } +void Menu::fill(std::vector<MenuItem>& items) +{ + for(std::vector<MenuItem>::iterator item = items.begin(); + item != items.end(); ++item) + { + item->setPosition(0,0); + add(&*item); + } +} |