1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#ifndef MENU_MANAGER_H
#define MENU_MANAGER_H
#include <cassert>
#include <pgapplication.h>
#include <pgthemewidget.h>
#include "Tools.h"
#include "MenuIds.h"
class Menu;
class MenuManager
{
public:
static void init(const char* layout, const char* theme);
static void initScreen(bool fullScreen);
static void destroy();
static MenuManager* getInstance()
{
assert(sm_instance != NULL);
return sm_instance;
}
void changeTo(Menu* menu,
bool background = true,
bool overridePrevious = true);
void hideAll();
void redrawBackground();
static PG_Widget* getWidgetById(int id);
protected:
MenuManager();
MenuManager(MenuManager&);
virtual ~MenuManager();
void check(PG_Widget* w, int id);
static MenuManager* sm_instance;
PG_Application* m_app;
Menu* m_current;
PG_ThemeWidget *m_background;
};
#endif // MENU_MANAGER_H
|