Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_settings_game_view.qc File Reference
#include "dialog_settings_game_view.qh"
#include "textlabel.qh"
#include "checkbox.qh"
#include "mixedslider.qh"
#include "slider.qh"
#include "radiobutton.qh"
Include dependency graph for dialog_settings_game_view.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticGameViewSettingsTab ()
void XonoticGameViewSettingsTab_fill (entity me)
void XonoticGameViewSettingsTab_showNotify (entity me)

Function Documentation

◆ makeXonoticGameViewSettingsTab()

entity makeXonoticGameViewSettingsTab ( )

Definition at line 13 of file dialog_settings_game_view.qc.

14{
15 entity me;
17 me.configureDialog(me);
18 return me;
19}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define NEW(cname,...)
Definition oo.qh:117

References entity(), and NEW.

◆ XonoticGameViewSettingsTab_fill()

void XonoticGameViewSettingsTab_fill ( entity me)

Definition at line 21 of file dialog_settings_game_view.qc.

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

References entity(), makeMulti(), makeXonoticCheckBox(), makeXonoticCheckBox_T(), makeXonoticCheckBoxEx(), makeXonoticCheckBoxEx_T(), makeXonoticHeaderLabel(), makeXonoticMixedSlider(), makeXonoticMixedSlider_T(), makeXonoticRadioButton(), makeXonoticSlider(), makeXonoticSlider_T(), makeXonoticTextLabel(), setDependent(), setDependentAND(), setDependentNOT(), and ZCTX.

◆ XonoticGameViewSettingsTab_showNotify()

void XonoticGameViewSettingsTab_showNotify ( entity me)

Definition at line 9 of file dialog_settings_game_view.qc.

10{
11 loadAllCvars(me);
12}
void loadAllCvars(entity root)
Definition util.qc:53

References entity(), and loadAllCvars().