From f7cc62d9d98ba28d2a5c6032a050f311b460db10 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Thu, 15 Nov 2018 15:51:29 -0500 Subject: [PATCH] Define menu enum, encode hierachy by number places --- src/m_menu.h | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/src/m_menu.h b/src/m_menu.h index ad32de1b1..e5d508d7f 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -22,6 +22,99 @@ // // MENUS // + +// Menu IDs sectioned by numeric places to signify hierarchy +typedef enum +{ + MM_NONE = 0, + + MM_MAIN = 10000, + + // Single Player + MM_SP_MAIN = 11000, + + MM_SP_LOAD = 11100, + MM_SP_PLAYER = 11110, + + MM_SP_LEVELSELECT = 11200, + MM_SP_LEVELSTATS = 11300, + + MM_SP_TIMEATTACK = 11400, + MM_SP_GUESTREPLAY = 11410, + MM_SP_REPLAY = 11420, + MM_SP_GHOST = 11430, + + MM_SP_NIGHTSATTACK = 11500, + MM_SP_NIGHTS_GUESTREPLAY = 11510, + MM_SP_NIGHTS_REPLAY = 11520, + MM_SP_NIGHTS_GHOST = 11530, + + // Multiplayer + MM_MP_MAIN = 12000, + MM_MP_SPLITSCREEN = 12100, // SplitServer + MM_MP_SPLIT_PLAYERSETUP = 12110, // MP_PlayerSetupDef for #defined NONET + MM_MP_SERVER = 12200, + MM_MP_CONNECT = 12300, + MM_MP_ROOM = 12400, + MM_MP_PLAYERSETUP = 12500, // MP_PlayerSetupDef shared with SPLITSCREEN if #defined NONET + + // Options + MM_OP_MAIN = 13000, + + MM_OP_P1CONTROLS = 13100, + MM_OP_P1CONTROLCHANGE = 13110, // OP_ChangeControlsDef shared with P2 + MM_OP_P1MOUSE = 13120, + MM_OP_P1JOYSTICK = 13130, + MM_OP_P1JOYSTICKSET = 13131, // OP_JoystickSetDef shared with P2 + + MM_OP_P2CONTROLS = 13200, + MM_OP_P2CONTROLCHANGE = 13120, + MM_OP_P2MOUSE = 13220, + MM_OP_P2JOYSTICK = 13230, + MM_OP_P2JOYSTICKSET = 13231, + + MM_OP_VIDEO = 13300, + MM_OP_VIDEOMODE = 13310, + MM_OP_COLOR = 13320, + MM_OP_OPENGL = 13330, + MM_OP_OPENGL_LIGHTING = 13331, + MM_OP_OPENGL_FOG = 13332, + MM_OP_OPENGL_COLOR = 13333, + + MM_OP_SOUND = 13400, + + MM_OP_SERVER = 13500, + MM_OP_MONITORTOGGLE = 13510, + + MM_OP_DATA = 13600, + MM_OP_ADDONS = 13610, + MM_OP_SCREENSHOTS = 13620, + MM_OP_ERASEDATA = 13630, + + // Secrets + MM_SR_MAIN = 14000, + MM_SR_PANDORA = 14100, + MM_SR_LEVELSELECT = 14200, + MM_SR_UNLOCKCHECKLIST = 14300, + MM_SR_EMBLEMHINT = 14400, + + // Addons (Part of MISC, but let's make it our own) + MM_AD_MAIN = 15000 + + // MISC + MM_MESSAGE = 20000, + MM_SPAUSE = 30000, + + MM_MPAUSE = 40000, + MM_SCRAMBLETEAM = 41000, + MM_CHANGETEAM = 42000, + MM_CHANGELEVEL = 43000, + + MM_MAPAUSE = 50000, + MM_HELP = 60000 +} menutype_t; + + // Called by main loop, // saves config file and calls I_Quit when user exits. // Even when the menu is not displayed,