]> 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 samual/flyingspectators
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_waypoint.c
1 #ifdef INTERFACE
2 CLASS(XonoticWaypointDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticWaypointDialog, fill, void(entity))
4         METHOD(XonoticWaypointDialog, showNotify, void(entity))
5         ATTRIB(XonoticWaypointDialog, title, string, _("Waypoints"))
6         ATTRIB(XonoticWaypointDialog, color, vector, SKINCOLOR_DIALOG_WAYPOINTS)
7         ATTRIB(XonoticWaypointDialog, intendedWidth, float, 0.5)
8         ATTRIB(XonoticWaypointDialog, rows, float, 6)
9         ATTRIB(XonoticWaypointDialog, columns, float, 3)
10 ENDCLASS(XonoticWaypointDialog)
11 #endif
12
13 #ifdef IMPLEMENTATION
14 void XonoticWaypointDialog_showNotify(entity me)
15 {
16         loadAllCvars(me);
17 }
18 void XonoticWaypointDialog_fill(entity me)
19 {
20         entity e;
21
22         me.TR(me);
23                 me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Show base waypoints")));
24         me.TR(me);
25                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint scale:")));
26                         me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "g_waypointsprite_scale"));
27                                 setDependent(e, "cl_hidewaypoints", 0, 0);
28         me.TR(me);
29                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint alpha:")));
30                         me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha"));
31                                 setDependent(e, "cl_hidewaypoints", 0, 0);
32         me.TR(me);
33         me.TR(me);
34                 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Show names:")));
35                 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_shownames"));
36                         e.addValue(e, _("Never"), "0");
37                         e.addValue(e, _("Teammates"), "1");
38                         e.addValue(e, _("All players"), "2");
39                         e.configureXonoticTextSliderValues(e);
40         me.gotoRC(me, me.rows - 1, 0);
41                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
42                         e.onClick = Dialog_Close;
43                         e.onClickEntity = me;
44 }
45 #endif