mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
the early beginnings of the serverlist qc
This commit is contained in:
parent
49ef391664
commit
952d14a149
3 changed files with 115 additions and 2 deletions
|
@ -11,7 +11,7 @@ QCPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include
|
|||
|
||||
pkgdata_DATA= menu.dat
|
||||
|
||||
menu_src= menu.qc options.qc cbuf_def.qc cvar_def.qc draw_def.qc file_def.qc game_def.qc inputline_def.qc key_defs.qc menu_def.qc options_util.qc string_def.qc controls_o.qc
|
||||
menu_src= menu.qc servlist.qc options.qc cbuf_def.qc cvar_def.qc draw_def.qc file_def.qc game_def.qc inputline_def.qc key_defs.qc menu_def.qc options_util.qc string_def.qc controls_o.qc
|
||||
|
||||
menu.dat: menu.src $(menu_src)
|
||||
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -P $<
|
||||
|
|
|
@ -470,7 +470,16 @@ void () main_menu =
|
|||
Menu_Cursor (spinner);
|
||||
if (do_single_player)
|
||||
single_player_menu ();
|
||||
multi_player_menu ();
|
||||
switch (gametype ()) {
|
||||
case "netquake":
|
||||
multi_player_menu ();
|
||||
break;
|
||||
case "quakeworld":
|
||||
server_list_menu ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
options_menu ();
|
||||
help_menu ();
|
||||
Menu_Item (54, 112, "", quit_f, 0);
|
||||
|
|
104
cs-code/servlist.qc
Normal file
104
cs-code/servlist.qc
Normal file
|
@ -0,0 +1,104 @@
|
|||
void (integer x, integer y, integer width, integer lines) text_box;
|
||||
|
||||
integer () servlist_favorates_draw =
|
||||
{
|
||||
Draw_Pic (16, 4, "gfx/qplaque.lmp");
|
||||
Draw_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Draw_String (54, 40, "Under Construction");
|
||||
return 1;
|
||||
};
|
||||
|
||||
integer () servlist_all_draw =
|
||||
{
|
||||
Draw_Pic (16, 4, "gfx/qplaque.lmp");
|
||||
Draw_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Draw_String (54, 40, "Under Construction");
|
||||
return 1;
|
||||
};
|
||||
|
||||
integer serv_nfull;
|
||||
integer serv_nempty;
|
||||
inputline_t serv_maxping;
|
||||
inputline_t serv_game;
|
||||
inputline_t input_active;
|
||||
|
||||
integer () servlist_filter_draw =
|
||||
{
|
||||
Draw_Pic (16, 4, "gfx/qplaque.lmp");
|
||||
Draw_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Draw_String (62, 40, "Max Ping........:");
|
||||
text_box (206, 32, 4, 1);
|
||||
InputLine_Draw (serv_maxping, 206, 40, 1);
|
||||
Draw_String (62, 56, "Game Contains...:");
|
||||
text_box (206, 48, 8, 1);
|
||||
Draw_String (62, 72, "Server Not Full.:");
|
||||
Draw_String (206, 72, ((serv_nfull == 0)?"No":"Yes"));
|
||||
Draw_String (62, 88, "Server Not Empty:");
|
||||
Draw_String (206, 88, ((serv_nempty == 0)?"No":"Yes"));
|
||||
Draw_String (62, 96, "Under Construction");
|
||||
opt_cursor (54, (Menu_GetIndex() * 16) + 40);
|
||||
return 1;
|
||||
};
|
||||
|
||||
void () servlist_favorates_menu =
|
||||
{
|
||||
Menu_Begin (54, 40, "favorates");
|
||||
Menu_FadeScreen (1);
|
||||
Menu_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Menu_Draw (servlist_favorates_draw);
|
||||
Menu_End ();
|
||||
};
|
||||
|
||||
void () servlist_all_menu =
|
||||
{
|
||||
Menu_Begin (54, 48, "all");
|
||||
Menu_FadeScreen (1);
|
||||
Menu_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Menu_Draw (servlist_all_draw);
|
||||
Menu_End ();
|
||||
};
|
||||
|
||||
integer (string text, integer key) sl_filter_in =
|
||||
{
|
||||
load_keybindings();
|
||||
switch (text) {
|
||||
case "isnfull":
|
||||
serv_nfull ^= 1;
|
||||
break;
|
||||
case "isnempty":
|
||||
serv_nempty ^= 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
void () servlist_filter_menu =
|
||||
{
|
||||
Menu_Begin (54, 56, "filter");
|
||||
Menu_FadeScreen (1);
|
||||
Menu_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
Menu_Item (62, 40, "ping", sl_filter_in, 0);
|
||||
Menu_Item (62, 48, "gametext", sl_filter_in, 0);
|
||||
Menu_Item (62, 56, "isnfull", sl_filter_in, 0);
|
||||
Menu_Item (62, 64, "isnempty", sl_filter_in, 0);
|
||||
Menu_Draw (servlist_filter_draw);
|
||||
Menu_End ();
|
||||
};
|
||||
|
||||
void () server_list_menu =
|
||||
{
|
||||
serv_maxping = InputLine_Create (4, 8, ' ');
|
||||
InputLine_SetWidth (serv_maxping, 5);
|
||||
|
||||
Menu_Begin (54, 52, "");
|
||||
Menu_FadeScreen (1);
|
||||
Menu_Pic (16, 4, "gfx/qplaque.lmp");
|
||||
Menu_CenterPic (160, 4, "gfx/p_multi.lmp");
|
||||
servlist_favorates_menu ();
|
||||
servlist_all_menu ();
|
||||
servlist_filter_menu ();
|
||||
Menu_End ();
|
||||
};
|
||||
|
Loading…
Reference in a new issue