1 #include "dialog_multiplayer_join.qh"
3 #include "serverlist.qh"
5 #include "textlabel.qh"
10 entity makeXonoticServerListTab()
13 me = NEW(XonoticServerListTab);
14 me.configureDialog(me);
17 void XonoticServerListTab_fill(entity me)
21 slist = makeXonoticServerList();
23 me.gotoRC(me, 0.5, 0);
24 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Filter:")));
25 me.TD(me, 1, 2.8, e = makeXonoticInputBox(0, string_null));
26 e.onChange = ServerList_Filter_Change;
27 e.onChangeEntity = slist;
28 slist.controlledTextbox = e;
30 me.gotoRC(me, 0.5, 3.6);
31 me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "menu_slist_categories", ZCTX(_("SRVS^Categories"))));
32 e.onClickEntity = slist;
33 e.onClick = ServerList_Categories_Click;
34 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty")),
35 _("Show empty servers")));
36 slist.filterShowEmpty = e.checked;
37 e.onClickEntity = slist;
38 e.onClick = ServerList_ShowEmpty_Click;
39 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showfull", ZCTX(_("SRVS^Full")),
40 _("Show full servers that have no slots available")));
41 slist.filterShowFull = e.checked;
42 e.onClickEntity = slist;
43 e.onClick = ServerList_ShowFull_Click;
44 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "net_slist_pause", _("Pause"),
45 _("Pause updating the server list to prevent servers from \"jumping around\"")));
48 me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
49 me.TD(me, 1, 1, slist.sortButton2 = makeXonoticButton(string_null, '0 0 0'));
50 me.TD(me, 1, 1, slist.sortButton3 = makeXonoticButton(string_null, '0 0 0'));
51 me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
52 me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
54 me.TD(me, me.rows - 5, me.columns, slist);
56 me.gotoRC(me, me.rows - 2, 0);
57 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
58 me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
59 e.onEnter = ServerList_Connect_Click;
60 e.onEnterEntity = slist;
61 e.onChange = ServerList_Update_favoriteButton;
62 e.onChangeEntity = slist;
63 slist.ipAddressBox = e;
64 me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
65 e.onClick = ServerList_Favorite_Click;
66 e.onClickEntity = slist;
67 slist.favoriteButton = e;
68 me.TD(me, 1, 1.5, e = makeXonoticButton_T(_("Info..."), '0 0 0',
69 _("Show more information about the currently highlighted server")));
70 e.onClick = ServerList_Info_Click;
71 e.onClickEntity = slist;
74 me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
75 e.onClick = ServerList_Connect_Click;
76 e.onClickEntity = slist;
77 slist.connectButton = e;