1 #include "dialog_multiplayer_join.qh"
2 #ifndef DIALOG_MULTIPLAYER_JOIN_H
3 #define DIALOG_MULTIPLAYER_JOIN_H
5 CLASS(XonoticServerListTab, XonoticTab)
6 METHOD(XonoticServerListTab, fill, void(entity));
7 ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9)
8 ATTRIB(XonoticServerListTab, rows, float, 23)
9 ATTRIB(XonoticServerListTab, columns, float, 6.5)
10 ENDCLASS(XonoticServerListTab)
11 entity makeXonoticServerListTab();
16 entity makeXonoticServerListTab()
19 me = NEW(XonoticServerListTab);
20 me.configureDialog(me);
23 void XonoticServerListTab_fill(entity me)
27 slist = makeXonoticServerList();
29 me.gotoRC(me, 0.5, 0);
30 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, _("Filter:")));
31 me.TD(me, 1, 2.8, e = makeXonoticInputBox(0, string_null));
32 e.onChange = ServerList_Filter_Change;
33 e.onChangeEntity = slist;
34 slist.controlledTextbox = e;
36 me.gotoRC(me, 0.5, 3.6);
37 me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "menu_slist_categories", ZCTX(_("SRVS^Categories"))));
38 e.onClickEntity = slist;
39 e.onClick = ServerList_Categories_Click;
40 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty")),
41 _("Show empty servers")));
42 slist.filterShowEmpty = e.checked;
43 e.onClickEntity = slist;
44 e.onClick = ServerList_ShowEmpty_Click;
45 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showfull", ZCTX(_("SRVS^Full")),
46 _("Show full servers that have no slots available")));
47 slist.filterShowFull = e.checked;
48 e.onClickEntity = slist;
49 e.onClick = ServerList_ShowFull_Click;
50 me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "net_slist_pause", _("Pause"),
51 _("Pause updating the server list to prevent servers from \"jumping around\"")));
54 me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
55 me.TD(me, 1, 1, slist.sortButton2 = makeXonoticButton(string_null, '0 0 0'));
56 me.TD(me, 1, 1, slist.sortButton3 = makeXonoticButton(string_null, '0 0 0'));
57 me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
58 me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
60 me.TD(me, me.rows - 5, me.columns, slist);
62 me.gotoRC(me, me.rows - 2, 0);
63 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
64 me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
65 e.onEnter = ServerList_Connect_Click;
66 e.onEnterEntity = slist;
67 e.onChange = ServerList_Update_favoriteButton;
68 e.onChangeEntity = slist;
69 slist.ipAddressBox = e;
70 me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
71 e.onClick = ServerList_Favorite_Click;
72 e.onClickEntity = slist;
73 slist.favoriteButton = e;
74 me.TD(me, 1, 1.5, e = makeXonoticButton_T(_("Info..."), '0 0 0',
75 _("Show more information about the currently highlighted server")));
76 e.onClick = ServerList_Info_Click;
77 e.onClickEntity = slist;
80 me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
81 e.onClick = ServerList_Connect_Click;
82 e.onClickEntity = slist;
83 slist.connectButton = e;