#ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN 1 #include #endif #include #include "button.h" #define MENU_MAX_BUTTONS 16 enum MenuState { MENU_MAIN, MENU_START, MENU_OPTIONS }; struct MenuStruct { struct ButtonStruct m_sButtons[MENU_MAX_BUTTONS]; }; int g_iState; // which menu state are we in struct MenuStruct g_sMenuMain; // definition of the main menu struct MenuStruct g_sMenuStart; // definition of the start menu struct MenuStruct g_sMenuOptions; // definition of the options menu void MenuMainRender(void) { } // MenuMainRender void MenuOptionsRender(void) { } // MenuMainRender void MenuSelectionRender(void) { } // MenuMainRender void MenuInit(void) { g_iState = MENU_MAIN; } // InitMenu void MenuRender(void) { glColor3d(1, 1, 1); switch (g_iState) { case MENU_MAIN: MenuMainRender(); break; case MENU_START: MenuOptionsRender(); break; case MENU_OPTIONS: MenuSelectionRender(); break; } } // Render