]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_join.qc
add g_tdm_teams_override and g_domination_teams_override to cvar whitelist
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_join.qc
1 #ifndef DIALOG_MULTIPLAYER_JOIN_H
2 #define DIALOG_MULTIPLAYER_JOIN_H
3 #include "tab.qc"
4 CLASS(XonoticServerListTab, XonoticTab)
5         METHOD(XonoticServerListTab, fill, void(entity))
6         ATTRIB(XonoticServerListTab, title, string, _("Join"))
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();
12 #endif
13
14 #ifdef IMPLEMENTATION
15
16 entity makeXonoticServerListTab()
17 {
18         entity me;
19         me = NEW(XonoticServerListTab);
20         me.configureDialog(me);
21         return me;
22 }
23 void XonoticServerListTab_fill(entity me)
24 {
25         entity e, slist;
26
27         slist  = makeXonoticServerList();
28
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;
35
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(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty"))));
41                         slist.filterShowEmpty = e.checked;
42                         e.onClickEntity = slist;
43                         e.onClick = ServerList_ShowEmpty_Click;
44                 me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", ZCTX(_("SRVS^Full"))));
45                         slist.filterShowFull = e.checked;
46                         e.onClickEntity = slist;
47                         e.onClick = ServerList_ShowFull_Click;
48                 me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", _("Pause")));
49
50         me.gotoRC(me, 2, 0);
51                 me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
52                 me.TD(me, 1, 1, slist.sortButton2 = makeXonoticButton(string_null, '0 0 0'));
53                 me.TD(me, 1, 1, slist.sortButton3 = makeXonoticButton(string_null, '0 0 0'));
54                 me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
55                 me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
56         me.TR(me);
57                 me.TD(me, me.rows - 5, me.columns, slist);
58
59         me.gotoRC(me, me.rows - 2, 0);
60                 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
61                 me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
62                         e.onEnter = ServerList_Connect_Click;
63                         e.onEnterEntity = slist;
64                         e.onChange = ServerList_Update_favoriteButton;
65                         e.onChangeEntity = slist;
66                         slist.ipAddressBox = e;
67                 me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
68                         e.onClick = ServerList_Favorite_Click;
69                         e.onClickEntity = slist;
70                         slist.favoriteButton = e;
71                 me.TD(me, 1, 1.5, e = makeXonoticButton(_("Info..."), '0 0 0'));
72                         e.onClick = ServerList_Info_Click;
73                         e.onClickEntity = slist;
74                         slist.infoButton = e;
75         me.TR(me);
76                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
77                         e.onClick = ServerList_Connect_Click;
78                         e.onClickEntity = slist;
79                         slist.connectButton = e;
80 }
81 #endif