Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion code/q3_ui/ui_ingame.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ INGAME MENU
#define ID_QUIT 17
#define ID_RESUME 18
#define ID_TEAMORDERS 19
// https://github.com/clover-moe/mint-arena/pull/7
#define ID_CREATE 20


typedef struct {
Expand All @@ -37,6 +39,7 @@ typedef struct {
menutext_s server;
menutext_s leave;
menutext_s restart;
menutext_s startnew;
menutext_s addbots;
menutext_s removebots;
menutext_s teamorders;
Expand Down Expand Up @@ -103,6 +106,10 @@ void InGame_Event( void *ptr, int notification ) {
UI_ConfirmMenu( "RESTART ARENA?", (voidfunc_f)0, InGame_RestartAction );
break;

case ID_CREATE:
UI_StartServerMenu( qtrue );
break;

case ID_QUIT:
UI_ConfirmMenu( "EXIT GAME?", (voidfunc_f)0, InGame_QuitAction );
break;
Expand Down Expand Up @@ -154,7 +161,7 @@ void InGame_MenuInit( void ) {
s_ingame.frame.generic.x = 320-233;//142;
s_ingame.frame.generic.y = 240-166;//118;
s_ingame.frame.width = 466;//359;
s_ingame.frame.height = 332;//256;
s_ingame.frame.height = 356;//256;

//y = 96;
y = 88;
Expand Down Expand Up @@ -248,6 +255,22 @@ void InGame_MenuInit( void ) {
s_ingame.server.color = color_red;
s_ingame.server.style = UI_CENTER|UI_SMALLFONT;


y += INGAME_MENU_VERTICAL_SPACING;
s_ingame.startnew.generic.type = MTYPE_PTEXT;
s_ingame.startnew.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_ingame.startnew.generic.x = 320;
s_ingame.startnew.generic.y = y;
s_ingame.startnew.generic.id = ID_CREATE;
s_ingame.startnew.generic.callback = InGame_Event;
s_ingame.startnew.string = "CHANGE MAP";
s_ingame.startnew.color = color_red;
s_ingame.startnew.style = UI_CENTER|UI_SMALLFONT;
if( !trap_Cvar_VariableValue( "sv_running" ) ) {
s_ingame.startnew.generic.flags |= QMF_GRAYED;
}


y += INGAME_MENU_VERTICAL_SPACING;
s_ingame.restart.generic.type = MTYPE_PTEXT;
s_ingame.restart.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
Expand Down Expand Up @@ -303,6 +326,7 @@ void InGame_MenuInit( void ) {
Menu_AddItem( &s_ingame.menu, &s_ingame.setup );
Menu_AddItem( &s_ingame.menu, &s_ingame.server );
Menu_AddItem( &s_ingame.menu, &s_ingame.restart );
Menu_AddItem( &s_ingame.menu, &s_ingame.startnew );
Menu_AddItem( &s_ingame.menu, &s_ingame.resume );
Menu_AddItem( &s_ingame.menu, &s_ingame.leave );
Menu_AddItem( &s_ingame.menu, &s_ingame.quit );
Expand Down