2002-08-16 21:54:21 +00:00
|
|
|
#include "menu.h"
|
|
|
|
#include "draw.h"
|
|
|
|
#include "options_util.h"
|
|
|
|
#include "controls_o.h"
|
|
|
|
#include "client_menu.h"
|
|
|
|
|
2004-02-03 08:31:26 +00:00
|
|
|
#include "gui/InputLine.h"
|
|
|
|
#include "gui/Rect.h"
|
|
|
|
|
2003-05-06 02:19:13 +00:00
|
|
|
integer (integer x, integer y) servlist_favorates_draw =
|
2002-08-16 21:54:21 +00:00
|
|
|
{
|
2003-05-06 02:19:13 +00:00
|
|
|
Draw_Pic (x + 16, y + 4, Draw_CachePic ("gfx/qplaque.lmp", 1));
|
|
|
|
Draw_CenterPic (x + 160, y + 4, Draw_CachePic ("gfx/p_multi.lmp", 1));
|
|
|
|
Draw_String (x + 54, y + 40, "Under Construction");
|
2002-08-16 21:54:21 +00:00
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
|
2003-05-06 02:19:13 +00:00
|
|
|
integer (integer x, integer y) servlist_all_draw =
|
2002-08-16 21:54:21 +00:00
|
|
|
{
|
2003-05-06 02:19:13 +00:00
|
|
|
Draw_Pic (x + 16, y + 4, Draw_CachePic ("gfx/qplaque.lmp", 1));
|
|
|
|
Draw_CenterPic (x + 160, y + 4, Draw_CachePic ("gfx/p_multi.lmp", 1));
|
|
|
|
Draw_String (x + 54, y + 40, "Under Construction");
|
2002-08-16 21:54:21 +00:00
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
integer serv_nfull;
|
|
|
|
integer serv_nempty;
|
2002-08-20 06:22:28 +00:00
|
|
|
InputLine serv_maxping;
|
|
|
|
InputLine serv_game;
|
2002-08-16 21:54:21 +00:00
|
|
|
|
2003-05-06 02:19:13 +00:00
|
|
|
integer (integer x, integer y) servlist_filter_draw =
|
2002-08-16 21:54:21 +00:00
|
|
|
{
|
2003-05-06 02:19:13 +00:00
|
|
|
Draw_Pic (x + 16, y + 4, Draw_CachePic ("gfx/qplaque.lmp", 1));
|
|
|
|
Draw_CenterPic (x + 160, y + 4, Draw_CachePic ("gfx/p_multi.lmp", 1));
|
|
|
|
Draw_String (x + 62, y + 40, "Max Ping........:");
|
|
|
|
text_box (x + 206, y + 32, 4, 1);
|
|
|
|
[serv_maxping setBasePos:x y:y];
|
2004-02-13 05:36:35 +00:00
|
|
|
[serv_maxping cursor:1];
|
|
|
|
[serv_maxping draw];
|
2003-05-06 02:19:13 +00:00
|
|
|
Draw_String (x + 62, y + 56, "Game Contains...:");
|
|
|
|
text_box (x + 206, y + 48, 8, 1);
|
|
|
|
Draw_String (x + 62, y + 72, "Server Not Full.:");
|
|
|
|
Draw_String (x + 206, y + 72, ((serv_nfull == 0) ? "No" : "Yes"));
|
|
|
|
Draw_String (x + 62, y + 88, "Server Not Empty:");
|
|
|
|
Draw_String (x + 206, y + 88, ((serv_nempty == 0) ? "No" : "Yes"));
|
|
|
|
Draw_String (x + 62, y + 96, "Under Construction");
|
|
|
|
opt_cursor (x + 54, y + (Menu_GetIndex () * 16) + 40);
|
2002-08-16 21:54:21 +00:00
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
void () servlist_favorates_menu =
|
|
|
|
{
|
2002-08-23 02:52:20 +00:00
|
|
|
Menu_Begin (54, 40, "favorites");
|
2002-08-16 21:54:21 +00:00
|
|
|
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 =
|
|
|
|
{
|
2010-11-17 06:50:07 +00:00
|
|
|
serv_maxping = [[InputLine alloc] initWithBounds:makeRect (206, 40, 8, 4) promptCharacter:' '];
|
2002-08-20 06:22:28 +00:00
|
|
|
[serv_maxping setWidth:5];
|
2002-08-16 21:54:21 +00:00
|
|
|
|
|
|
|
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 ();
|
|
|
|
};
|