00001
00002
00004 #ifndef __MENU_H
00005 #define __MENU_H
00006
00007 #include "revolt.h"
00008 #include "TypeDefs.h"
00009
00010
00012
00014 enum
00015 {
00016 MENUITEM_HILIGHT = 0x00000001,
00017 };
00018
00020
00022
00023
00024 typedef struct t_MenuModel
00025 {
00026 VEC pos;
00027
00028
00029 } s_MenuModel;
00030
00031
00032
00033 struct t_Menu;
00034
00035 typedef struct t_MenuItem
00036 {
00037 int textX, textY;
00038 char *pText;
00039
00040 t_MenuModel *pModel;
00041
00042 t_MenuItem *pSelectMenuItem[4];
00043 t_Menu *pSelectMenu;
00044
00045 void (*Function[4])(t_Menu *pMenu);
00046
00047 } s_MenuItem;
00048
00049
00050
00051 typedef struct t_Menu
00052 {
00053 t_MenuItem **pMenuItems;
00054
00055 t_MenuItem *pMenuItemCur;
00056 int iMenuItemStart;
00057
00058 void (*StartUpFunc)(t_Menu *pMenu);
00059 int (*StartLoopFunc)(t_Menu *pMenu);
00060
00061 t_Menu *pParentMenu;
00062
00063 } s_Menu;
00064
00065
00067
00069
00070
00072
00074 void MenuInit(t_Menu *pMenu, t_Menu *pParentMenu);
00075 t_Menu *MenuProcess(t_Menu *pMenu);
00076 void MenuRender(t_Menu *pMenu);
00077
00078 void MenuItemRender(t_MenuItem *pMenuItem, int flags);
00079
00080
00081 void DecLightPower(t_Menu* pMenu);
00082 void IncLightPower(t_Menu* pMenu);
00083 void DecLightStrength(t_Menu* pMenu);
00084 void IncLightStrength(t_Menu* pMenu);
00085
00086
00088
00090 #endif //__MENU_H