]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_join.c
Add Archer to the credits
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_join.c
1 #ifdef INTERFACE
2 CLASS(XonoticServerListTab) EXTENDS(XonoticTab)
3         METHOD(XonoticServerListTab, fill, void(entity))
4         ATTRIB(XonoticServerListTab, title, string, _("Join"))
5         ATTRIB(XonoticServerListTab, intendedWidth, float, 0.9)
6         ATTRIB(XonoticServerListTab, rows, float, 22)
7         ATTRIB(XonoticServerListTab, columns, float, 6.5)
8 ENDCLASS(XonoticServerListTab)
9 entity makeXonoticServerListTab();
10 #endif
11
12 #ifdef IMPLEMENTATION
13
14 entity makeXonoticServerListTab()
15 {
16         entity me;
17         me = spawnXonoticServerListTab();
18         me.configureDialog(me);
19         return me;
20 }
21 void XonoticServerListTab_fill(entity me)
22 {
23         entity e, slist;
24
25         slist  = makeXonoticServerList();
26
27         me.TR(me);
28                 me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, _("Filter:")));
29                 me.TD(me, 1, me.columns - 0.6 * 3 - 0.9 - 0.4, e = makeXonoticInputBox(0, string_null));
30                         e.onChange = ServerList_Filter_Change;
31                         e.onChangeEntity = slist;
32                         slist.controlledTextbox = e;
33                 me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "menu_slist_categories", ZCTX(_("SRVS^Categories"))));
34                         e.onClickEntity = slist;
35                         e.onClick = ServerList_Categories_Click;
36                 me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty"))));
37                         slist.filterShowEmpty = e.checked;
38                         e.onClickEntity = slist;
39                         e.onClick = ServerList_ShowEmpty_Click;
40                 me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", ZCTX(_("SRVS^Full"))));
41                         slist.filterShowFull = e.checked;
42                         e.onClickEntity = slist;
43                         e.onClick = ServerList_ShowFull_Click;
44                 me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", _("Pause")));
45
46         me.TR(me);
47                 me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0'));
48                 me.TD(me, 1, 1, slist.sortButton2 = makeXonoticButton(string_null, '0 0 0'));
49                 me.TD(me, 1, 1, slist.sortButton3 = makeXonoticButton(string_null, '0 0 0'));
50                 me.TD(me, 1, 1, slist.sortButton4 = makeXonoticButton(string_null, '0 0 0'));
51                 me.TD(me, 1, 1, slist.sortButton5 = makeXonoticButton(string_null, '0 0 0'));
52         me.TR(me);
53                 me.TD(me, me.rows - 4, me.columns, slist);
54
55         me.gotoRC(me, me.rows - 2, 0);
56                 me.TD(me, 1, 0.6, e = makeXonoticTextLabel(0, _("Address:")));
57                 me.TD(me, 1, 2.9, e = makeXonoticInputBox(0, string_null));
58                         e.onEnter = ServerList_Connect_Click;
59                         e.onEnterEntity = slist;
60                         e.onChange = ServerList_Update_favoriteButton;
61                         e.onChangeEntity = slist;
62                         slist.ipAddressBox = e;
63                 me.TD(me, 1, 1.5, e = makeXonoticButton("", '0 0 0'));
64                         e.onClick = ServerList_Favorite_Click;
65                         e.onClickEntity = slist;
66                         slist.favoriteButton = e;
67                 me.TD(me, 1, 1.5, e = makeXonoticButton(_("Info..."), '0 0 0'));
68                         e.onClick = ServerList_Info_Click;
69                         e.onClickEntity = slist;
70                         slist.infoButton = e;
71         me.TR(me);
72                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("Join!"), '0 0 0'));
73                         e.onClick = ServerList_Connect_Click;
74                         e.onClickEntity = slist;
75                         slist.connectButton = e;
76 }
77 #endif