]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c
Updates to view settings dialog
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_playersetup_view.c
1 #ifdef INTERFACE
2 CLASS(XonoticViewDialog) EXTENDS(XonoticDialog)
3         METHOD(XonoticViewDialog, toString, string(entity))
4         METHOD(XonoticViewDialog, fill, void(entity))
5         METHOD(XonoticViewDialog, showNotify, void(entity))
6         ATTRIB(XonoticViewDialog, title, string, _("View settings"))
7         ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
8         ATTRIB(XonoticViewDialog, intendedWidth, float, 0.6)
9         ATTRIB(XonoticViewDialog, rows, float, 10)
10         ATTRIB(XonoticViewDialog, columns, float, 3)
11 ENDCLASS(XonoticViewDialog)
12 #endif
13
14 #ifdef IMPLEMENTATION
15 void XonoticViewDialog_showNotify(entity me)
16 {
17         loadAllCvars(me);
18 }
19 string XonoticViewDialog_toString(entity me)
20 {
21         return "hi"; //me.weaponsList.toString(me.weaponsList);
22 }
23 void XonoticViewDialog_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.TD(me, 1, 3, e = makeXonoticCheckBox(1, "hud_shownames", _("Show names above players")));
39         me.TR(me);
40                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling")));
41         me.TR(me);
42                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup")));
43         me.TR(me);
44                 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model")));
45         me.TR(me);
46                 me.TDempty(me, 0.2);
47                 me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align")));
48                         setDependent(e, "r_drawviewmodel", 1, 1);
49                 me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center")));
50                         setDependent(e, "r_drawviewmodel", 1, 1);
51                 me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align")));
52                         setDependent(e, "r_drawviewmodel", 1, 1);
53                         
54         me.gotoRC(me, me.rows - 1, 0);
55                 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
56                         e.onClick = Dialog_Close;
57                         e.onClickEntity = me;
58 }
59 #endif