diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-06 18:22:32 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-06 18:22:32 +0000 |
commit | a14d80f83aebe75241bf63b4f3ffca3a5d952577 (patch) | |
tree | fea36faedd17a0aa620f6d7e781a352327d6065d /src/ui/menu.h | |
parent | 343b0b4298e2d084d5544d3d40a8b7dcb586ce8e (diff) |
libui updates, support menu .ini files
Diffstat (limited to 'src/ui/menu.h')
-rw-r--r-- | src/ui/menu.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ui/menu.h b/src/ui/menu.h index 7ed905b..422b23f 100644 --- a/src/ui/menu.h +++ b/src/ui/menu.h @@ -7,24 +7,35 @@ #ifndef __INCLUDED_UI_MENU_H__ #define __INCLUDED_UI_MENU_H__ +#include "ui/bitmap.h" +#include "ui/button.h" +#include "ui/label.h" #include "ui/window.h" namespace ui { +/// a menu container class Menu : public Window { public: + /// create a new menu Menu(Window *parent, const char * label); ~Menu(); - void add_label(char const * text); - void add_button(char const *text, char const *command); + /// load a menu from ini/menus/label.ini + void load(); + + Label *add_label(char const * text=0); + Button *add_button(char const *text=0, char const *command=0); + + void set_background(const char *texture); protected: virtual void resize(); private: - Window menu_container; + Bitmap *menu_background; + Window *menu_container; }; } |