@@ -46,6 +46,8 @@ INGAME MENU
46
46
#define ID_QUIT 17
47
47
#define ID_RESUME 18
48
48
#define ID_TEAMORDERS 19
49
+ // https://github.com/clover-moe/mint-arena/pull/7
50
+ #define ID_CREATE 21
49
51
50
52
51
53
typedef struct {
@@ -57,6 +59,7 @@ typedef struct {
57
59
menutext_s server ;
58
60
menutext_s leave ;
59
61
menutext_s restart ;
62
+ menutext_s startnew ;
60
63
menutext_s addbots ;
61
64
menutext_s removebots ;
62
65
menutext_s teamorders ;
@@ -123,6 +126,10 @@ void InGame_Event( void *ptr, int notification ) {
123
126
UI_ConfirmMenu ( "RESTART ARENA?" , 0 , InGame_RestartAction );
124
127
break ;
125
128
129
+ case ID_CREATE :
130
+ UI_StartServerMenu ( qtrue );
131
+ break ;
132
+
126
133
case ID_QUIT :
127
134
UI_ConfirmMenu ( "EXIT GAME?" , 0 , InGame_QuitAction );
128
135
break ;
@@ -174,7 +181,7 @@ void InGame_MenuInit( void ) {
174
181
s_ingame .frame .generic .x = 320 - 233 ;//142;
175
182
s_ingame .frame .generic .y = 240 - 166 ;//118;
176
183
s_ingame .frame .width = 466 ;//359;
177
- s_ingame .frame .height = 332 ;//256;
184
+ s_ingame .frame .height = 356 ;//256;
178
185
179
186
//y = 96;
180
187
y = 88 ;
@@ -274,6 +281,20 @@ void InGame_MenuInit( void ) {
274
281
s_ingame .restart .generic .flags |= QMF_GRAYED ;
275
282
}
276
283
284
+ y += INGAME_MENU_VERTICAL_SPACING ;
285
+ s_ingame .startnew .generic .type = MTYPE_PTEXT ;
286
+ s_ingame .startnew .generic .flags = QMF_CENTER_JUSTIFY |QMF_PULSEIFFOCUS ;
287
+ s_ingame .startnew .generic .x = 320 ;
288
+ s_ingame .startnew .generic .y = y ;
289
+ s_ingame .startnew .generic .id = ID_CREATE ;
290
+ s_ingame .startnew .generic .callback = InGame_Event ;
291
+ s_ingame .startnew .string = "START NEW ARENA" ;
292
+ s_ingame .startnew .color = text_big_color ;
293
+ s_ingame .startnew .style = UI_CENTER |UI_SMALLFONT ;
294
+ if ( !trap_Cvar_VariableValue ( "sv_running" ) ) {
295
+ s_ingame .startnew .generic .flags |= QMF_GRAYED ;
296
+ }
297
+
277
298
y += INGAME_MENU_VERTICAL_SPACING ;
278
299
s_ingame .resume .generic .type = MTYPE_PTEXT ;
279
300
s_ingame .resume .generic .flags = QMF_CENTER_JUSTIFY |QMF_PULSEIFFOCUS ;
@@ -315,6 +336,7 @@ void InGame_MenuInit( void ) {
315
336
Menu_AddItem ( & s_ingame .menu , & s_ingame .setup );
316
337
Menu_AddItem ( & s_ingame .menu , & s_ingame .server );
317
338
Menu_AddItem ( & s_ingame .menu , & s_ingame .restart );
339
+ Menu_AddItem ( & s_ingame .menu , & s_ingame .startnew );
318
340
Menu_AddItem ( & s_ingame .menu , & s_ingame .resume );
319
341
Menu_AddItem ( & s_ingame .menu , & s_ingame .leave );
320
342
Menu_AddItem ( & s_ingame .menu , & s_ingame .quit );
0 commit comments