diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-12-05 19:36:17 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-12-05 19:36:17 +0100 |
commit | a7d63f886034ada73d707f4598bb2edace8f250e (patch) | |
tree | dd1414b87aaf097d6ef87021584742986471338b /assets | |
parent | b084995c8e7392c8f1151b01de21302e1c667a65 (diff) |
Convert all enums to #defines in ui/menudef.h.
Older Tremulous clients don't support them.
Diffstat (limited to 'assets')
-rw-r--r-- | assets/ui/menudef.h | 378 |
1 files changed, 174 insertions, 204 deletions
diff --git a/assets/ui/menudef.h b/assets/ui/menudef.h index 9ab2c4f..74904c2 100644 --- a/assets/ui/menudef.h +++ b/assets/ui/menudef.h @@ -1,121 +1,94 @@ #ifndef MENUDEF_H #define MENUDEF_H -enum -{ - ITEM_TYPE_ANY = -1, // invalid type - ITEM_TYPE_NONE, // no specified type - ITEM_TYPE_TEXT, // simple text - ITEM_TYPE_BUTTON, // button, basically text with a border - ITEM_TYPE_RADIOBUTTON, // toggle button, may be grouped - ITEM_TYPE_CHECKBOX, // check box - ITEM_TYPE_EDITFIELD, // editable text, associated with a cvar - ITEM_TYPE_SAYFIELD, // the chat field - ITEM_TYPE_CYCLE, // cycling list - ITEM_TYPE_LISTBOX, // scrollable list - ITEM_TYPE_COMBOBOX, // drop down scrollable list - ITEM_TYPE_MODEL, // model - ITEM_TYPE_OWNERDRAW, // owner draw, has an associated ownerdraw number - ITEM_TYPE_NUMERICFIELD, // editable text, associated with a cvar - ITEM_TYPE_SLIDER, // mouse speed, volume, etc. - ITEM_TYPE_YESNO, // boolean cvar setting - ITEM_TYPE_MULTI, // multiple list setting, enumerated - ITEM_TYPE_BIND // keyboard control configuration -}; +#define ITEM_TYPE_ANY -1 // invalid type +#define ITEM_TYPE_NONE 0 // no specified type +#define ITEM_TYPE_TEXT 1 // simple text +#define ITEM_TYPE_BUTTON 2 // button basically text with a border +#define ITEM_TYPE_RADIOBUTTON 3 // toggle button may be grouped +#define ITEM_TYPE_CHECKBOX 4 // check box +#define ITEM_TYPE_EDITFIELD 5 // editable text associated with a cvar +#define ITEM_TYPE_SAYFIELD 6 // the chat field +#define ITEM_TYPE_CYCLE 7 // cycling list +#define ITEM_TYPE_LISTBOX 8 // scrollable list +#define ITEM_TYPE_COMBOBOX 9 // drop down scrollable list +#define ITEM_TYPE_MODEL 10 // model +#define ITEM_TYPE_OWNERDRAW 11 // owner draw has an associated ownerdraw number +#define ITEM_TYPE_NUMERICFIELD 12 // editable text associated with a cvar +#define ITEM_TYPE_SLIDER 13 // mouse speed volume etc. +#define ITEM_TYPE_YESNO 14 // boolean cvar setting +#define ITEM_TYPE_MULTI 15 // multiple list setting enumerated +#define ITEM_TYPE_BIND 16 // keyboard control configuration // The first items in these enums are the defaults if menus do not specify -enum -{ - ALIGN_LEFT, // left alignment - ALIGN_CENTER, // center alignment - ALIGN_RIGHT, // right alignment - ASPECT_NONE, // no aspect compensation - ALIGN_NONE -}; - -enum -{ - VALIGN_BOTTOM, // bottom alignment - VALIGN_CENTER, // center alignment - VALIGN_TOP, // top alignment - VALIGN_NONE -}; - -enum -{ - ITEM_TEXTSTYLE_NORMAL, // normal text - ITEM_TEXTSTYLE_BLINK, // fast blinking - ITEM_TEXTSTYLE_PULSE, // slow pulsing - ITEM_TEXTSTYLE_SHADOWED, // drop shadow (need a color for this) - ITEM_TEXTSTYLE_OUTLINED, // apparently unimplemented - ITEM_TEXTSTYLE_OUTLINESHADOWED, // apparently unimplemented - ITEM_TEXTSTYLE_SHADOWEDMORE, // drop shadow (need a color for this) - ITEM_TEXTSTYLE_NEON // glow (need a color for this) -}; - -enum -{ - WINDOW_BORDER_NONE, // no border - WINDOW_BORDER_FULL, // full border based on border color (single pixel) - WINDOW_BORDER_HORZ, // horizontal borders only - WINDOW_BORDER_VERT, // vertical borders only - WINDOW_BORDER_KCGRADIENT // horizontal border using the gradient bars -}; - -enum -{ - WINDOW_STYLE_EMPTY, // no background - WINDOW_STYLE_FILLED, // filled with background color - WINDOW_STYLE_GRADIENT, // gradient bar based on background color - WINDOW_STYLE_SHADER, // use background shader - WINDOW_STYLE_TEAMCOLOR, // team color - WINDOW_STYLE_CINEMATIC // cinematic -}; +#define ALIGN_LEFT 0 // left alignment +#define ALIGN_CENTER 1 // center alignment +#define ALIGN_RIGHT 2 // right alignment +#define ASPECT_NONE 3 // no aspect compensation +#define ALIGN_NONE 4 + +#define VALIGN_BOTTOM 0 // bottom alignment +#define VALIGN_CENTER 1 // center alignment +#define VALIGN_TOP 2 // top alignment +#define VALIGN_NONE 3 + +#define ITEM_TEXTSTYLE_NORMAL 0 // normal text +#define ITEM_TEXTSTYLE_BLINK 1 // fast blinking +#define ITEM_TEXTSTYLE_PULSE 2 // slow pulsing +#define ITEM_TEXTSTYLE_SHADOWED 3 // drop shadow (need a color for this) +#define ITEM_TEXTSTYLE_OUTLINED 4 // apparently unimplemented +#define ITEM_TEXTSTYLE_OUTLINESHADOWED 5 // apparently unimplemented +#define ITEM_TEXTSTYLE_SHADOWEDMORE 6 // drop shadow (need a color for this) +#define ITEM_TEXTSTYLE_NEON 7 // glow (need a color for this) + +#define WINDOW_BORDER_NONE 0 // no border +#define WINDOW_BORDER_FULL 1 // full border based on border color (single pixel) +#define WINDOW_BORDER_HORZ 2 // horizontal borders only +#define WINDOW_BORDER_VERT 3 // vertical borders only +#define WINDOW_BORDER_KCGRADIENT 4 // horizontal border using the gradient bars + +#define WINDOW_STYLE_EMPTY 0 // no background +#define WINDOW_STYLE_FILLED 1 // filled with background color +#define WINDOW_STYLE_GRADIENT 2 // gradient bar based on background color +#define WINDOW_STYLE_SHADER 3 // use background shader +#define WINDOW_STYLE_TEAMCOLOR 4 // team color +#define WINDOW_STYLE_CINEMATIC 5 // cinematic #define MENU_TRUE 1 // uh.. true #define MENU_FALSE 0 // and false -enum -{ - HUD_VERTICAL, - HUD_HORIZONTAL -}; +#define HUD_VERTICAL 0 +#define HUD_HORIZONTAL 1 // list box element types -enum -{ - LISTBOX_TEXT, - LISTBOX_IMAGE -}; +#define LISTBOX_TEXT 0 +#define LISTBOX_IMAGE 1 // list feeders -enum -{ - FEEDER_SERVERS, // servers - FEEDER_MAPS, // all maps available, in graphic format - FEEDER_ALIENTEAM_LIST, // alien team members - FEEDER_HUMANTEAM_LIST, // human team members - FEEDER_TEAM_LIST, // team members for team voting - FEEDER_PLAYER_LIST, // players - FEEDER_NEWS, // news - FEEDER_MODS, // list of available mods - FEEDER_DEMOS, // list of available demo files - FEEDER_SERVERSTATUS, // server status - FEEDER_FINDPLAYER, // find player - FEEDER_CINEMATICS, // cinematics - - FEEDER_TREMTEAMS, // teams - FEEDER_TREMALIENCLASSES, // alien classes - FEEDER_TREMHUMANITEMS, // human items - FEEDER_TREMHUMANARMOURYBUY, // human buy - FEEDER_TREMHUMANARMOURYSELL, // human sell - FEEDER_TREMALIENUPGRADE, // alien upgrade - FEEDER_TREMALIENBUILD, // alien buildables - FEEDER_TREMHUMANBUILD, // human buildables - FEEDER_IGNORE_LIST, // ignored players - FEEDER_HELP_LIST, // help topics - FEEDER_RESOLUTIONS // display resolutions -}; +#define FEEDER_SERVERS 0 // servers +#define FEEDER_MAPS 1 // all maps available in graphic format +#define FEEDER_ALIENTEAM_LIST 2 // alien team members +#define FEEDER_HUMANTEAM_LIST 3 // human team members +#define FEEDER_TEAM_LIST 4 // team members for team voting +#define FEEDER_PLAYER_LIST 5 // players +#define FEEDER_NEWS 6 // news +#define FEEDER_MODS 7 // list of available mods +#define FEEDER_DEMOS 8 // list of available demo files +#define FEEDER_SERVERSTATUS 9 // server status +#define FEEDER_FINDPLAYER 10 // find player +#define FEEDER_CINEMATICS 11 // cinematics + +#define FEEDER_TREMTEAMS 0 // teams +#define FEEDER_TREMALIENCLASSES 1 // alien classes +#define FEEDER_TREMHUMANITEMS 2 // human items +#define FEEDER_TREMHUMANARMOURYBUY 3 // human buy +#define FEEDER_TREMHUMANARMOURYSELL 4 // human sell +#define FEEDER_TREMALIENUPGRADE 5 // alien upgrade +#define FEEDER_TREMALIENBUILD 6 // alien buildables +#define FEEDER_TREMHUMANBUILD 7 // human buildables +#define FEEDER_IGNORE_LIST 8 // ignored players +#define FEEDER_HELP_LIST 9 // help topics +#define FEEDER_RESOLUTIONS 10 // display resolutions // display flags #define UI_SHOW_FAVORITESERVERS 0x00000001 @@ -129,106 +102,103 @@ enum #define UI_SHOW_NOTSPECTATING 0x00000040 // owner draw types -enum -{ - CG_PLAYER_HEALTH, - CG_PLAYER_HEALTH_CROSS, - CG_PLAYER_AMMO_VALUE, - CG_PLAYER_CLIPS_VALUE, - CG_PLAYER_BUILD_TIMER, - CG_PLAYER_CREDITS_VALUE, - CG_PLAYER_CREDITS_VALUE_NOPAD, - CG_PLAYER_STAMINA, - CG_PLAYER_STAMINA_1, - CG_PLAYER_STAMINA_2, - CG_PLAYER_STAMINA_3, - CG_PLAYER_STAMINA_4, - CG_PLAYER_STAMINA_BOLT, - CG_PLAYER_BOOST_BOLT, - CG_PLAYER_CLIPS_RING, - CG_PLAYER_BUILD_TIMER_RING, - CG_PLAYER_SELECT, - CG_PLAYER_SELECTTEXT, - CG_PLAYER_WEAPONICON, - CG_PLAYER_WALLCLIMBING, - CG_PLAYER_BOOSTED, - CG_PLAYER_POISON_BARBS, - CG_PLAYER_BOMBS, - CG_PLAYER_PRICKLES, - CG_PLAYER_FBREATH, - CG_DRAW_INVI_STAT, - CG_DRAW_INVI_OVERLAY, - CG_PLAYER_ALIEN_SENSE, - CG_PLAYER_HUMAN_SCANNER, - CG_PLAYER_USABLE_BUILDABLE, - CG_PLAYER_CHARGE_BAR_BG, - CG_PLAYER_CHARGE_BAR, - CG_PLAYER_CROSSHAIR, - CG_PLAYER_LOCATION, - CG_TEAMOVERLAY, - CG_PLAYER_CREDITS_FRACTION, - - CG_KILLER, - CG_SPECTATORS, - CG_FOLLOW, +#define CG_PLAYER_HEALTH 0 +#define CG_PLAYER_HEALTH_CROSS 1 +#define CG_PLAYER_AMMO_VALUE 2 +#define CG_PLAYER_CLIPS_VALUE 3 +#define CG_PLAYER_BUILD_TIMER 4 +#define CG_PLAYER_CREDITS_VALUE 5 +#define CG_PLAYER_CREDITS_VALUE_NOPAD 6 +#define CG_PLAYER_STAMINA 7 +#define CG_PLAYER_STAMINA_1 8 +#define CG_PLAYER_STAMINA_2 9 +#define CG_PLAYER_STAMINA_3 10 +#define CG_PLAYER_STAMINA_4 11 +#define CG_PLAYER_STAMINA_BOLT 12 +#define CG_PLAYER_BOOST_BOLT 13 +#define CG_PLAYER_CLIPS_RING 14 +#define CG_PLAYER_BUILD_TIMER_RING 15 +#define CG_PLAYER_SELECT 16 +#define CG_PLAYER_SELECTTEXT 17 +#define CG_PLAYER_WEAPONICON 18 +#define CG_PLAYER_WALLCLIMBING 19 +#define CG_PLAYER_BOOSTED 20 +#define CG_PLAYER_POISON_BARBS 21 +#define CG_PLAYER_BOMBS 22 +#define CG_PLAYER_PRICKLES 23 +#define CG_PLAYER_FBREATH 24 +#define CG_DRAW_INVI_STAT 25 +#define CG_DRAW_INVI_OVERLAY 26 +#define CG_PLAYER_ALIEN_SENSE 27 +#define CG_PLAYER_HUMAN_SCANNER 28 +#define CG_PLAYER_USABLE_BUILDABLE 29 +#define CG_PLAYER_CHARGE_BAR_BG 30 +#define CG_PLAYER_CHARGE_BAR 31 +#define CG_PLAYER_CROSSHAIR 32 +#define CG_PLAYER_LOCATION 33 +#define CG_TEAMOVERLAY 34 +#define CG_PLAYER_CREDITS_FRACTION 35 + +#define CG_KILLER 36 +#define CG_SPECTATORS 37 +#define CG_FOLLOW 38 // loading screen - CG_LOAD_LEVELSHOT, - CG_LOAD_EDGESHOT, - CG_LOAD_MEDIA, - CG_LOAD_MEDIA_LABEL, - CG_LOAD_BUILDABLES, - CG_LOAD_BUILDABLES_LABEL, - CG_LOAD_CHARMODEL, - CG_LOAD_CHARMODEL_LABEL, - CG_LOAD_OVERALL, - CG_LOAD_LEVELNAME, - CG_LOAD_MOTD, - CG_LOAD_HOSTNAME, - - CG_FPS, - CG_FPS_FIXED, - CG_TIMER, - CG_TIMER_MINS, - CG_TIMER_SECS, - CG_SNAPSHOT, - CG_LAGOMETER, - CG_SPEEDOMETER, - CG_PLAYER_CROSSHAIRNAMES, - CG_STAGE_REPORT_TEXT, - CG_ALIEN_BUILD_POOL, - CG_HUMAN_BUILD_POOL, - CG_BUILD_POOL_BARS, - CG_ALIEN_NOBP_FLASH, - CG_HUMAN_NOBP_FLASH, - CG_ALIENS_SCORE_LABEL, - CG_HUMANS_SCORE_LABEL, - CG_DEMO_PLAYBACK, - CG_DEMO_RECORDING, - - CG_CONSOLE, - CG_TUTORIAL, - CG_CLOCK, - - UI_NETSOURCE, - UI_NETMAPPREVIEW, - UI_NETMAPCINEMATIC, - UI_SERVERREFRESHDATE, - UI_SERVERMOTD, - UI_GLINFO, - UI_KEYBINDSTATUS, - UI_SELECTEDMAPPREVIEW, - UI_SELECTEDMAPNAME, - - UI_TEAMINFOPANE, - UI_ACLASSINFOPANE, - UI_AUPGRADEINFOPANE, - UI_HITEMINFOPANE, - UI_HBUYINFOPANE, - UI_HSELLINFOPANE, - UI_ABUILDINFOPANE, - UI_HBUILDINFOPANE, - UI_HELPINFOPANE -}; +#define CG_LOAD_LEVELSHOT 39 +#define CG_LOAD_EDGESHOT 40 +#define CG_LOAD_MEDIA 41 +#define CG_LOAD_MEDIA_LABEL 42 +#define CG_LOAD_BUILDABLES 43 +#define CG_LOAD_BUILDABLES_LABEL 44 +#define CG_LOAD_CHARMODEL 45 +#define CG_LOAD_CHARMODEL_LABEL 46 +#define CG_LOAD_OVERALL 47 +#define CG_LOAD_LEVELNAME 48 +#define CG_LOAD_MOTD 49 +#define CG_LOAD_HOSTNAME 50 + +#define CG_FPS 51 +#define CG_FPS_FIXED 52 +#define CG_TIMER 53 +#define CG_TIMER_MINS 54 +#define CG_TIMER_SECS 55 +#define CG_SNAPSHOT 56 +#define CG_LAGOMETER 57 +#define CG_SPEEDOMETER 58 +#define CG_PLAYER_CROSSHAIRNAMES 59 +#define CG_STAGE_REPORT_TEXT 60 +#define CG_ALIEN_BUILD_POOL 61 +#define CG_HUMAN_BUILD_POOL 62 +#define CG_BUILD_POOL_BARS 63 +#define CG_ALIEN_NOBP_FLASH 64 +#define CG_HUMAN_NOBP_FLASH 65 +#define CG_ALIENS_SCORE_LABEL 66 +#define CG_HUMANS_SCORE_LABEL 67 +#define CG_DEMO_PLAYBACK 68 +#define CG_DEMO_RECORDING 69 + +#define CG_CONSOLE 70 +#define CG_TUTORIAL 71 +#define CG_CLOCK 72 + +#define UI_NETSOURCE 73 +#define UI_NETMAPPREVIEW 74 +#define UI_NETMAPCINEMATIC 75 +#define UI_SERVERREFRESHDATE 76 +#define UI_SERVERMOTD 77 +#define UI_GLINFO 78 +#define UI_KEYBINDSTATUS 79 +#define UI_SELECTEDMAPPREVIEW 80 +#define UI_SELECTEDMAPNAME 81 + +#define UI_TEAMINFOPANE 82 +#define UI_ACLASSINFOPANE 83 +#define UI_AUPGRADEINFOPANE 84 +#define UI_HITEMINFOPANE 85 +#define UI_HBUYINFOPANE 86 +#define UI_HSELLINFOPANE 87 +#define UI_ABUILDINFOPANE 88 +#define UI_HBUILDINFOPANE 89 +#define UI_HELPINFOPANE 90 #endif |