From a14d80f83aebe75241bf63b4f3ffca3a5d952577 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 6 Oct 2008 18:22:32 +0000 Subject: libui updates, support menu .ini files --- src/ui/menu.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/ui/menu.h') 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; }; } -- cgit v1.2.3