]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_waypoint.c
Merge remote branch 'origin/master' into fruitiex/fruitbalance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_waypoint.c
1 #ifdef INTERFACE
2 CLASS(XonoticWaypointDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticWaypointDialog, toString, string(entity))
4         METHOD(XonoticWaypointDialog, fill, void(entity))
5         METHOD(XonoticWaypointDialog, showNotify, void(entity))
6         ATTRIB(XonoticWaypointDialog, title, string, "Waypoints")
7         ATTRIB(XonoticWaypointDialog, color, vector, SKINCOLOR_DIALOG_RADAR)
8         ATTRIB(XonoticWaypointDialog, intendedWidth, float, 0.7)
9         ATTRIB(XonoticWaypointDialog, rows, float, 6)
10         ATTRIB(XonoticWaypointDialog, columns, float, 4)
11 ENDCLASS(XonoticWaypointDialog)
12 #endif
13
14 #ifdef IMPLEMENTATION
15 void XonoticWaypointDialog_showNotify(entity me)
16 {
17         loadAllCvars(me);
18 }
19 string XonoticWaypointDialog_toString(entity me)
20 {
21         return "XXX";
22 }
23 void XonoticWaypointDialog_fill(entity me)
24 {
25         entity e;
26         
27         me.TR(me);
28                 me.TD(me, 1, 4, makeXonoticTextLabel(0, "Waypoint settings:"));
29         me.TR(me);
30                 me.TDempty(me, 0.2);
31                 me.TD(me, 1, 3.8, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
32         me.TR(me);
33                 me.TDempty(me, 0.2);
34                 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint scale:"));
35                         me.TD(me, 1, 3, e = makeXonoticSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale"));
36                                 setDependent(e, "cl_hidewaypoints", 0, 0);
37         me.TR(me);
38                 me.TDempty(me, 0.2);
39                 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
40                         me.TD(me, 1, 3, e = makeXonoticSlider(0.1, 1, 0.01, "g_waypointsprite_alpha"));
41                                 setDependent(e, "cl_hidewaypoints", 0, 0);
42         me.TR(me);
43                 me.TDempty(me, 0.2);
44                 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Show names:"));
45                 me.TD(me, 1, 3, e = makeXonoticTextSlider("cl_shownames"));
46                         e.addValue(e, "Never", "0");
47                         e.addValue(e, "Teammates", "1");
48                         e.addValue(e, "All players", "2");
49                         e.configureXonoticTextSliderValues(e);
50         me.gotoRC(me, me.rows - 1, 0);
51                 me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
52                         e.onClick = Dialog_Close;
53                         e.onClickEntity = me;
54 }
55
56 #endif