Xonotic
dialog_settings_game_view.qc
Go to the documentation of this file.
2 
3 #include "textlabel.qh"
4 #include "checkbox.qh"
5 #include "textslider.qh"
6 #include "slider.qh"
7 #include "radiobutton.qh"
8 
10 {
11  loadAllCvars(me);
12 }
14 {
15  entity me;
17  me.configureDialog(me);
18  return me;
19 }
20 
22 {
23  entity e;
24 
25  me.TR(me);
26  me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
27  me.TR(me);
28  me.TDempty(me, 0.2);
29  me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(2, 0, "cl_eventchase_death", _("Slide to third person upon death")));
30  setDependent(e, "chase_active", -1, 0);
31  me.TR(me);
32  me.TDempty(me, 0.2);
33  me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
34  setDependent(e, "chase_active", -1, 0);
35  me.TR(me);
36  me.TDempty(me, 0.2);
37  me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
38  setDependent(e, "chase_active", -1, 0);
39  me.TR(me);
40  me.TDempty(me, 0.2);
41  me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle")));
42  setDependent(e, "chase_active", -1, 0);
43  me.TR(me);
44  me.TDempty(me, 0.2);
45  me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(0.01, 0, "cl_bob", _("View bobbing while walking around"), "-"));
46  makeMulti(e, "cl_bob2");
47  setDependent(e, "chase_active", -1, 0);
48  me.TR(me);
49  me.TR(me);
50  me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
51  me.TR(me);
52  me.TDempty(me, 0.2);
53  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Back distance")));
54  setDependent(e, "chase_active", 1, 1);
55  me.TD(me, 1, 2, e = makeXonoticSlider(10, 100, 1, "chase_back"));
56  setDependent(e, "chase_active", 1, 1);
57  me.TR(me);
58  me.TDempty(me, 0.2);
59  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Up distance")));
60  setDependent(e, "chase_active", 1, 1);
61  me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
62  setDependent(e, "chase_active", 1, 1);
63  me.TR(me);
64  me.TR(me);
65  me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
66  e.sendCvars = true;
67 
68  me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
69  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
70  me.TD(me, 1, 2, e = makeXonoticSlider_T(60, 130, 5, "fov",
71  _("Field of vision in degrees")));
72  me.TR(me);
73  me.TR(me);
74  //me.TDempty(me, 0.2);
75  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom factor:"))));
76  me.TD(me, 1, 2, e = makeXonoticSlider_T(2, 30, 0.5, "cl_zoomfactor",
77  _("How big the zoom factor is when the zoom button is pressed")));
78  me.TR(me);
79  //me.TDempty(me, 0.2);
80  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom speed:"))));
81  me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_zoomspeed",
82  _("How fast the view will be zoomed, disable to zoom instantly")));
83  e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense.
84  e.addValue(e, "2", "2");
85  e.addValue(e, "3", "3");
86  e.addValue(e, "4", "4");
87  e.addValue(e, "5", "5");
88  e.addValue(e, "6", "6");
89  e.addValue(e, "7", "7");
90  e.addValue(e, "8", "8");
91  e.addValue(e, ZCTX(_("ZOOM^Instant")), "-1");
92  e.configureXonoticTextSliderValues(e);
93  me.TR(me);
94  //me.TDempty(me, 0.2);
95  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom sensitivity:"))));
96  me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 1, 0.1, "cl_zoomsensitivity",
97  _("How zoom changes sensitivity, from 0 (lower sensitivity) to 1 (no sensitivity change)")));
98  me.TR(me);
99  me.TR(me);
100  me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_velocityzoom_enabled", _("Velocity zoom")));
101  me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(3, 1, "cl_velocityzoom_type", _("Forward movement only")));
102  setDependent(e, "cl_velocityzoom_enabled", 1, 1);
103  me.TR(me);
104  me.TDempty(me, 0.2);
105  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Factor"))));
106  setDependentAND(e, "cl_velocityzoom_enabled", 1, 1, "cl_velocityzoom_type", 1, 3);
107  me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.1, "cl_velocityzoom_factor"));
108  setDependentAND(e, "cl_velocityzoom_enabled", 1, 1, "cl_velocityzoom_type", 1, 3);
109  me.TR(me);
110  me.TR(me);
111  //me.TDempty(me, 0.2);
112  me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_reticle", _("Display reticle 2D overlay while zooming")));
113  me.TR(me);
114  //me.TDempty(me, 0.2);
115  me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_unpress_zoom_on_death", _("Release zoom when you die or respawn"), "-"));
116  makeMulti(e, "cl_unpress_zoom_on_spawn");
117  me.TR(me);
118  //me.TDempty(me, 0.2);
119  me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_unpress_zoom_on_weapon_switch", _("Release zoom when you switch weapons")));
120 }
#define NEW(cname,...)
Definition: oo.qh:105
entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
Definition: checkbox.qc:40
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
Definition: radiobutton.qc:10
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
entity makeXonoticTextSlider_T(string theCvar, string theTooltip)
Definition: textslider.qc:3
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition: slider.qc:10
#define ZCTX(s)
Definition: i18n.qh:68
entity makeXonoticCheckBoxEx_T(float theYesValue, float theNoValue, string theCvar, string theText, string theTooltip)
Definition: checkbox.qc:33
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
Definition: slider.qc:3
entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
Definition: checkbox.qc:3
void XonoticGameViewSettingsTab_fill(entity me)
entity makeXonoticGameViewSettingsTab()
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28
void XonoticGameViewSettingsTab_showNotify(entity me)