]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_waypoint.c
935c9628895d5850fb59b674329fa2dc350a0e45
[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.5)
9         ATTRIB(XonoticWaypointDialog, rows, float, 6)
10         ATTRIB(XonoticWaypointDialog, columns, float, 3)
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, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", "Show base waypoints"));
29         me.TR(me);
30                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Waypoint scale:"));
31                 me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "g_waypointsprite_scale"));
32                         setDependent(e, "cl_hidewaypoints", 0, 0);
33         me.TR(me);
34                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Waypoint alpha:"));
35                 me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha"));
36                         setDependent(e, "cl_hidewaypoints", 0, 0);
37         me.TR(me);
38         me.TR(me);
39                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Show names:"));
40                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_shownames"));
41                         e.addValue(e, "Never", "0");
42                         e.addValue(e, "Teammates", "1");
43                         e.addValue(e, "All players", "2");
44                         e.configureXonoticTextSliderValues(e);
45         me.gotoRC(me, me.rows - 1, 0);
46                 me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
47                         e.onClick = Dialog_Close;
48                         e.onClickEntity = me;
49 }
50 #endif