Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_settings_game_view.qc
Go to the documentation of this file.
2
3#include "textlabel.qh"
4#include "checkbox.qh"
5#include "mixedslider.qh"
6#include "slider.qh"
7#include "radiobutton.qh"
8
14{
16 me.configureDialog(me);
17 return me;
18}
19
21{
22 entity e;
23
24 me.TR(me);
25 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Perspective")));
26 me.TR(me);
27 me.TDempty(me, 0.2);
28 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
29 me.TD(me, 1, 1.8, e = makeXonoticSlider_T(60, 130, 5, "fov",
30 _("Field of vision in degrees")));
31 e.formatString = _("%s°");
32 me.TR(me);
33 me.TR(me);
34 me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
35 me.TR(me);
36 me.TDempty(me, 0.2);
37 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(2, 0, "cl_eventchase_death", _("Slide to third person upon death")));
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(0.05, 0, "cl_bobfall", _("Smooth the view when landing from a jump")));
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(0.05, 0, "cl_smoothviewheight", _("Smooth the view while crouching")));
46 setDependent(e, "chase_active", -1, 0);
47 me.TR(me);
48 me.TDempty(me, 0.2);
49 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(0.01, 0, "cl_bob", _("View bobbing while walking around"), "-"));
50 makeMulti(e, "cl_bob2");
51 setDependent(e, "chase_active", -1, 0);
52 me.TR(me);
53 me.TDempty(me, 0.2);
54 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(1, 0, "v_idlescale", _("View waving while idle")));
55 setDependent(e, "chase_active", -1, 0);
56 me.TR(me);
57 me.TR(me);
58 me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "1", _("3rd person perspective")));
59 me.TR(me);
60 me.TDempty(me, 0.2);
61 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Back distance")));
62 setDependent(e, "chase_active", 1, 1);
63 me.TD(me, 1, 1.8, e = makeXonoticSlider(10, 100, 1, "chase_back"));
64 e.formatString = _("%s qu");
65 setDependent(e, "chase_active", 1, 1);
66 me.TR(me);
67 me.TDempty(me, 0.2);
68 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Up distance")));
69 setDependent(e, "chase_active", 1, 1);
70 me.TD(me, 1, 1.8, e = makeXonoticSlider(10, 50, 1, "chase_up"));
71 e.formatString = _("%s qu");
72 setDependent(e, "chase_active", 1, 1);
73 me.TR(me);
74 me.TR(me);
75 me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
76 e.sendCvars = true;
77
78 me.gotoRC(me, 0, 3); me.setFirstColumn(me, me.currentColumn);
79 me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Zooming")));
80 me.TR(me);
81 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom factor:"))));
82 me.TD(me, 1, 2, e = makeXonoticMixedSlider_T("cl_zoomfactor",
83 _("How big the zoom factor is when the zoom button is pressed")));
84 e.formatString = _("%sx");
85 e.addRange(e, 2, 10, 0.5);
86 e.addRange(e, 11, 30, 1);
87 e.configureXonoticMixedSliderValues(e);
88 me.TR(me);
89 //me.TDempty(me, 0.2);
90 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom speed:"))));
91 setDependentNOT(e, "cl_zoomfactor", 1);
92 me.TD(me, 1, 2, e = makeXonoticMixedSlider_T("cl_zoomspeed",
93 _("How fast the view will be zoomed, disable to zoom instantly")));
94 e.addRange(e, 1, 8, 1);
95 e.addText(e, ZCTX(_("ZOOM^Instant")), -1);
96 e.configureXonoticMixedSliderValues(e);
97 setDependentNOT(e, "cl_zoomfactor", 1);
98 me.TR(me);
99 //me.TDempty(me, 0.2);
100 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom sensitivity:"))));
101 setDependentNOT(e, "cl_zoomfactor", 1);
102 me.TD(me, 1, 2, e = makeXonoticSlider_T(0.05, 1, 0.05, "cl_zoomsensitivity",
103 _("How zoom changes sensitivity, from 0% (lower sensitivity) to 100% (no sensitivity change)")));
104 e.formatString = "%";
105 setDependentNOT(e, "cl_zoomfactor", 1);
106 me.TR(me);
107 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_zoomscroll", _("Zoom scrolling")));
108 setDependentNOT(e, "cl_zoomfactor", 1);
109 me.TR(me);
110 me.TDempty(me, 0.2);
111 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Scale:")));
112 setDependentNOT(e, "cl_zoomfactor", 1);
113 setDependentAND(e, "cl_zoomscroll", 1, 1);
114 me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.1, "cl_zoomscroll_scale")); // would be better if this could skip 0
115 e.formatString = _("%sx");
116 setDependentNOT(e, "cl_zoomfactor", 1);
117 setDependentAND(e, "cl_zoomscroll", 1, 1);
118 me.TR(me);
119 me.TDempty(me, 0.2);
120 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed:")));
121 setDependentNOT(e, "cl_zoomfactor", 1);
122 setDependentAND(e, "cl_zoomscroll", 1, 1);
123 me.TD(me, 1, 2, e = makeXonoticMixedSlider("cl_zoomscroll_speed"));
124 e.addRange(e, 2, 16, 2);
125 e.addText(e, ZCTX(_("ZOOM^Instant")), -1);
126 e.configureXonoticMixedSliderValues(e);
127 setDependentNOT(e, "cl_zoomfactor", 1);
128 setDependentAND(e, "cl_zoomscroll", 1, 1);
129 me.TR(me);
130 me.TR(me);
131 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_velocityzoom_enabled", _("Velocity zoom")));
132 me.TR(me);
133 me.TDempty(me, 0.2);
134 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Factor"))));
135 setDependent(e, "cl_velocityzoom_enabled", 1, 1);
136 setDependentAND(e, "cl_velocityzoom_type", 1, 3);
137 me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.1, "cl_velocityzoom_factor"));
138 e.formatString = _("%sx");
139 setDependent(e, "cl_velocityzoom_enabled", 1, 1);
140 setDependentAND(e, "cl_velocityzoom_type", 1, 3);
141 me.TR(me);
142 me.TDempty(me, 0.2);
143 me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 1, "cl_velocityzoom_type", _("Forward movement only")));
144 setDependentNOT(e, "cl_velocityzoom_factor", 0);
145 setDependentAND(e, "cl_velocityzoom_enabled", 1, 1);
146 me.TR(me);
147 me.TR(me);
148 //me.TDempty(me, 0.2);
149 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_reticle", _("Display reticle 2D overlay while zooming")));
150 me.TR(me);
151 //me.TDempty(me, 0.2);
152 me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_unpress_zoom_on_death", _("Release zoom when you die or respawn"), "-"));
153 makeMulti(e, "cl_unpress_zoom_on_spawn");
154 me.TR(me);
155 //me.TDempty(me, 0.2);
156 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_unpress_zoom_on_weapon_switch", _("Release zoom when you switch weapons")));
157}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity makeXonoticGameViewSettingsTab()
void XonoticGameViewSettingsTab_fill(entity me)
void XonoticGameViewSettingsTab_showNotify(entity me)
#define ZCTX(s)
Definition i18n.qh:68
void loadAllCvars(entity root)
Definition util.qc:53
void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:213
void makeMulti(entity e, string otherCvars)
Definition util.qc:92
void setDependentNOT(entity e, string theCvarName, float theCvarValue)
Definition util.qc:192
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax)
Definition util.qc:180
#define NEW(cname,...)
Definition oo.qh:117
entity makeXonoticTextLabel(float theAlign, string theText)
Definition textlabel.qc:3
entity makeXonoticHeaderLabel(string theText)
Definition textlabel.qc:9
entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
Definition checkbox.qc:3
entity makeXonoticCheckBoxEx_T(float theYesValue, float theNoValue, string theCvar, string theText, string theTooltip)
Definition checkbox.qc:33
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition checkbox.qc:28
entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText)
Definition checkbox.qc:39
entity makeXonoticMixedSlider(string theCvar)
Definition mixedslider.qc:9
entity makeXonoticMixedSlider_T(string theCvar, string theTooltip)
Definition mixedslider.qc:3
entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText)
Definition radiobutton.qc:9
entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
Definition slider.qc:3
entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar)
Definition slider.qc:9