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.9)
9 ATTRIB(XonoticViewDialog, rows, float, 12)
10 ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space
11 ENDCLASS(XonoticViewDialog)
15 void XonoticViewDialog_showNotify(entity me)
19 string XonoticViewDialog_toString(entity me)
21 return "hi"; //me.weaponsList.toString(me.weaponsList);
23 void XonoticViewDialog_fill(entity me)
28 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
29 me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
32 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Zoom:")));
33 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_reticle"));
34 e.addValue(e, _("Fullscreen"), "0");
35 e.addValue(e, _("With reticle"), "1");
36 e.configureXonoticTextSliderValues(e);
39 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Factor:")));
40 me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor"));
43 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed:")));
44 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed"));
45 e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense.
46 e.addValue(e, "2", "2");
47 e.addValue(e, "3", "3");
48 e.addValue(e, "4", "4");
49 e.addValue(e, "5", "5");
50 e.addValue(e, "6", "6");
51 e.addValue(e, "7", "7");
52 e.addValue(e, "8", "8");
53 e.addValue(e, _("Instant"), "-1");
54 e.configureXonoticTextSliderValues(e);
57 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Sensitivity:")));
58 me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity"));
60 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Velocity zoom:")));
61 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_velocityzoom_type"));
62 e.addValue(e, _("Disabled"), "0");
63 e.addValue(e, _("Forward only"), "3");
64 e.addValue(e, _("All directions"), "1");
65 e.configureXonoticTextSliderValues(e);
68 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed")));
69 me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.2, "cl_velocityzoom"));
70 setDependent(e, "cl_velocityzoom_type", 1, 3);
73 me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
75 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
76 me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
77 makeMulti(e, "crosshair_hittest_showimpact");
80 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
81 setDependent(e, "chase_active", -1, 0);
84 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
85 setDependent(e, "chase_active", -1, 0);
88 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(2, 0, "v_idlescale", _("View waving while idle")));
89 setDependent(e, "chase_active", -1, 0);
92 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.65, 0, "cl_bobcycle", _("View bobbing while walking around")));
93 makeMulti(e, "cl_bob2cycle");
94 setDependent(e, "chase_active", -1, 0);
97 me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
98 makeMulti(e, "crosshair_hittest_showimpact");
101 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
102 setDependent(e, "chase_active", 1, 1);
103 me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back"));
104 setDependent(e, "chase_active", 1, 1);
107 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance")));
108 setDependent(e, "chase_active", 1, 1);
109 me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
110 setDependent(e, "chase_active", 1, 1);
113 me.gotoRC(me, me.rows - 1, 0);
114 me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
115 e.onClick = Dialog_Close;
116 e.onClickEntity = me;