MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MultiGameOptionsMenu

Function MultiGameOptionsMenu

Descent3/multi_ui.cpp:1105–1680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103#define SHIP_ALLOW_HS_ID 0xdd
1104
1105void MultiGameOptionsMenu(int alloptions) {
1106
1107#define MULTI_OPT_TITLE_Y 30
1108#define MULTI_OPT_EDITS_Y 80
1109#define MULTI_OPT_EDITS_X_LCOL1 40
1110#define MULTI_OPT_EDITS_X_COL1 160
1111#define MULTI_OPT_EDITS_X_LCOL2 300
1112#define MULTI_OPT_EDITS_X_COL2 460
1113#define MULTI_OPT_TOGGLES_Y 210
1114#define MULTI_OPT_TOGGLES_X 40
1115#define MULTI_OPT_TOGGLES_COL2_X 300
1116#define MULTI_OPT_LABEL_OFS 10
1117#define MULTI_OPT_HOTSPOT_X_MID 410
1118#define MULTI_OPT_HOTSPOT_Y 360
1119
1120 UITextItem options_title_text(BIG_BRIEFING_FONT, TXT_GEN_MPLYROPTIONS, UICOL_WINDOW_TITLE);
1121 UITextItem time_limit_text(TXT_GEN_TIMELIMIT, UICOL_TEXT_NORMAL);
1122 UITextItem kill_goal_text(TXT_GEN_KILLGOAL, UICOL_TEXT_NORMAL);
1123 UITextItem pps_text(TXT_GEN_PPS, UICOL_TEXT_NORMAL);
1124 UITextItem respawn_rate_text(TXT_GEN_RESPAWNRATE, UICOL_TEXT_NORMAL);
1125 UITextItem max_players_text(TXT_GEN_MAXPLAYERS, UICOL_TEXT_NORMAL);
1126
1127 UITextItem exit_on_text(TXT_DONE, UICOL_HOTSPOT_HI);
1128 UITextItem exit_off_text(TXT_DONE, UICOL_HOTSPOT_LO);
1129
1130 UITextItem cancel_on_text(TXT_CANCEL, UICOL_HOTSPOT_HI);
1131 UITextItem cancel_off_text(TXT_CANCEL, UICOL_HOTSPOT_LO);
1132
1133 UITextItem ship_on_text(TXT_GEN_CFGALLOWEDSHIP, UICOL_HOTSPOT_HI);
1134 UITextItem ship_off_text(TXT_GEN_CFGALLOWEDSHIP, UICOL_HOTSPOT_LO);
1135
1136 UITextItem blank_text("", UICOL_TEXT_NORMAL);
1137
1138 char str[100];
1139
1140 int cancel_id;
1141 rendering_state rs;
1142 rend_GetRenderState(&rs);
1143
1144 NewUIWindow main_wnd;
1145 main_wnd.Create(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL);
1146
1147 int num_text = 0, num_edit = 0;
1148 int return_id;
1149 int id = 0;
1150
1151 UIText title_txt;
1152 title_txt.Create(&main_wnd, &options_title_text, 0, MULTI_OPT_TITLE_Y, UIF_CENTER);
1153 int cury = MULTI_OPT_EDITS_Y;
1154 // Time limit
1155 UIText time_limit;
1156 time_limit.Create(&main_wnd, &time_limit_text, MULTI_OPT_EDITS_X_LCOL1, cury + MULTI_OPT_LABEL_OFS, 0);
1157 NewUIEdit time_limit_edit;
1158 time_limit_edit.Create(&main_wnd, id++, MULTI_OPT_EDITS_X_COL1, cury, 100, 15, 0);
1159 cury += 20;
1160 cury += 20;
1161
1162 // Kill goal

Callers

nothing calls this directly

Calls 15

DoUIFunction · 0.85
DoMultiAllowedFunction · 0.85
SetSelectedColorMethod · 0.80
SetHiliteColorMethod · 0.80
LoadBackgroundImageMethod · 0.80
rend_GetRenderStateFunction · 0.50
CreateMethod · 0.45
AddItemMethod · 0.45
SelectItemMethod · 0.45
SetTextMethod · 0.45
OpenMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected