Xonotic
dialog_settings_audio.qc File Reference
#include "dialog_settings_audio.qh"
#include "slider_decibels.qh"
#include "commandbutton.qh"
#include "textlabel.qh"
#include "checkbox.qh"
#include "radiobutton.qh"
#include "textslider.qh"
#include "checkbox_slider_invalid.qh"
+ Include dependency graph for dialog_settings_audio.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticAudioSettingsTab ()
 
void XonoticAudioSettingsTab_fill (entity me)
 

Function Documentation

◆ makeXonoticAudioSettingsTab()

entity makeXonoticAudioSettingsTab ( )

Definition at line 11 of file dialog_settings_audio.qc.

References entity(), and NEW.

12 {
13  entity me;
15  me.configureDialog(me);
16  return me;
17 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:

◆ XonoticAudioSettingsTab_fill()

void XonoticAudioSettingsTab_fill ( entity  me)

Definition at line 19 of file dialog_settings_audio.qc.

References entity(), and makeXonoticCommandButton().

20 {
21  entity e, e2, s;
22  entity audioApplyButton = makeXonoticCommandButton(_("Apply immediately"), '0 0 0',
23  "snd_restart;"
24  "snd_attenuation_method_${menu_snd_attenuation_method};"
26  audioApplyButton.disableOnClick = true;
27 
28  me.TR(me);
29  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "mastervolume", "-");
30  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Master:")));
31  me.TD(me, 1, 2, s);
32  me.TR(me);
33  me.TDempty(me, 0.2);
34  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "bgmvolume", "-");
35  makeMulti(s, "snd_channel8volume");
36  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Music:")));
37  me.TD(me, 1, 2, s);
38  setDependentStringNotEqual(e, "mastervolume", "0");
39  setDependentStringNotEqual(s, "mastervolume", "0");
40  me.TR(me);
41  me.TDempty(me, 0.2);
42  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_staticvolume", "-");
43  makeMulti(s, "snd_channel9volume");
44  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VOL^Ambient:"))));
45  me.TD(me, 1, 2, s);
46  setDependentStringNotEqual(e, "mastervolume", "0");
47  setDependentStringNotEqual(s, "mastervolume", "0");
48  me.TR(me);
49  me.TDempty(me, 0.2);
50  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel0volume", "-");
51  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Info:")));
52  me.TD(me, 1, 2, s);
53  setDependentStringNotEqual(e, "mastervolume", "0");
54  setDependentStringNotEqual(s, "mastervolume", "0");
55  me.TR(me);
56  me.TDempty(me, 0.2);
57  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel3volume", "-");
58  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Items:")));
59  me.TD(me, 1, 2, s);
60  setDependentStringNotEqual(e, "mastervolume", "0");
61  setDependentStringNotEqual(s, "mastervolume", "0");
62  me.TR(me);
63  me.TDempty(me, 0.2);
64  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel6volume", "-");
65  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Pain:")));
66  me.TD(me, 1, 2, s);
67  setDependentStringNotEqual(e, "mastervolume", "0");
68  setDependentStringNotEqual(s, "mastervolume", "0");
69  me.TR(me);
70  me.TDempty(me, 0.2);
71  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel7volume", "-");
72  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Player:")));
73  me.TD(me, 1, 2, s);
74  setDependentStringNotEqual(e, "mastervolume", "0");
75  setDependentStringNotEqual(s, "mastervolume", "0");
76  me.TR(me);
77  me.TDempty(me, 0.2);
78  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel4volume", "-");
79  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Shots:")));
80  me.TD(me, 1, 2, s);
81  setDependentStringNotEqual(e, "mastervolume", "0");
82  setDependentStringNotEqual(s, "mastervolume", "0");
83  me.TR(me);
84  me.TDempty(me, 0.2);
85  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel2volume", "-");
86  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Voice:")));
87  me.TD(me, 1, 2, s);
88  setDependentStringNotEqual(e, "mastervolume", "0");
89  setDependentStringNotEqual(s, "mastervolume", "0");
90  me.TR(me);
91  me.TDempty(me, 0.2);
92  s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel1volume", "-");
93  makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba
94  me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Weapons:")));
95  me.TD(me, 1, 2, s);
96  setDependentStringNotEqual(e, "mastervolume", "0");
97  setDependentStringNotEqual(s, "mastervolume", "0");
98  me.TR(me);
99  me.TR(me);
100  me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
101  e.applyButton = audioApplyButton;
102  me.TR(me);
103  me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
104 
105  me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
106  me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
107  me.TD(me, 1, 2, e = makeXonoticTextSlider_T("snd_speed",
108  _("Sound output frequency")));
109  e.addValue(e, _("8 kHz"), "8000");
110  e.addValue(e, _("11.025 kHz"), "11025");
111  e.addValue(e, _("16 kHz"), "16000");
112  e.addValue(e, _("22.05 kHz"), "22050");
113  e.addValue(e, _("24 kHz"), "24000");
114  e.addValue(e, _("32 kHz"), "32000");
115  e.addValue(e, _("44.1 kHz"), "44100");
116  e.addValue(e, _("48 kHz"), "48000");
117  e.configureXonoticTextSliderValues(e);
118  e.applyButton = audioApplyButton;
119  me.TR(me);
120  me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Channels:")));
121  me.TD(me, 1, 2, e = makeXonoticTextSlider_T("snd_channels",
122  _("Number of channels for the sound output")));
123  e.addValue(e, _("Mono"), "1");
124  e.addValue(e, _("Stereo"), "2");
125  e.addValue(e, _("2.1"), "3");
126  e.addValue(e, _("4"), "4");
127  e.addValue(e, _("5"), "5");
128  e.addValue(e, _("5.1"), "6");
129  e.addValue(e, _("6.1"), "7");
130  e.addValue(e, _("7.1"), "8");
131  e.configureXonoticTextSliderValues(e);
132  e.applyButton = audioApplyButton;
133  me.TR(me);
134  me.TR(me);
135  me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "snd_swapstereo", _("Swap stereo output channels"),
136  _("Swap left/right channels")));
137  setDependent(e, "snd_channels", 1.5, 0.5);
138  me.TR(me);
139  me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "snd_spatialization_control", _("Headphone friendly mode"),
140  _("Enable spatialization (blend the right and left channel slightly to decrease stereo separation a bit for headphones)")));
141  setDependent(e, "snd_channels", 1.5, 0.5);
142  me.TR(me);
143  me.TR(me);
144  me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_hitsound", _("Hit indication sound"),
145  _("Play a hit indicator sound when your shot hits an enemy")));
146  e.sendCvars = true;
147  me.TR(me);
148  me.TDempty(me, 0.2);
149  me.TD(me, 1, 2.8 / 3, e = makeXonoticRadioButton_T(3, "cl_hitsound", "1", ZCTX(_("SND^Fixed")), "-"));
150  e.sendCvars = true;
151  setDependent(e, "cl_hitsound", 1, 3);
152  me.TD(me, 1, 2.8 / 3, e = makeXonoticRadioButton_T(3, "cl_hitsound", "2", _("Decreasing"), _("Decrease pitch with more damage")));
153  e.sendCvars = true;
154  setDependent(e, "cl_hitsound", 1, 3);
155  me.TD(me, 1, 2.8 / 3, e = makeXonoticRadioButton_T(3, "cl_hitsound", "3", _("Increasing"), _("Increase pitch with more damage")));
156  e.sendCvars = true;
157  setDependent(e, "cl_hitsound", 1, 3);
158  me.TR(me);
159  me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
160  me.TR(me);
161  me.TD(me, 1, 1.2, e = makeXonoticCheckBox_T(0, "menu_sounds", _("Menu sounds"),
162  _("Play sounds when clicking menu items")));
163  me.TD(me, 1, 1.2, e.linkedCheckBox = e2 = makeXonoticCheckBoxEx_T(2, 1, "menu_sounds", _("Focus sounds"),
164  _("Play sounds when hovering over menu items too")));
165  setDependent(e2, "menu_sounds", 1, 2);
166  me.TR(me);
167  me.TR(me);
168  me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Time announcer:")));
169  me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_announcer_maptime"));
170  e.addValue(e, ZCTX(_("WRN^Disabled")), "0");
171  e.addValue(e, _("1 minute"), "1");
172  e.addValue(e, _("5 minutes"), "2");
173  e.addValue(e, ZCTX(_("WRN^Both")), "3");
174  e.configureXonoticTextSliderValues(e);
175  me.TR(me);
176  me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Automatic taunts:")));
177  me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_autotaunt",
178  _("Automatically taunt enemies after fragging them")));
179  e.addValue(e, _("Never"), "0");
180  e.addValue(e, _("Sometimes"), "0.35");
181  e.addValue(e, _("Often"), "0.65");
182  e.addValue(e, _("Always"), "1");
183  e.configureXonoticTextSliderValues(e);
184  e.sendCvars = true;
185  me.TR(me);
186  me.TR(me);
187  if(cvar("developer") > 0)
188  me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
189 
190  me.gotoRC(me, me.rows - 1, 0);
191  me.TD(me, 1, me.columns, audioApplyButton);
192 }
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
entity makeXonoticRadioButton_T(float theGroup, string theCvar, string theValue, string theText, string theTooltip)
Definition: radiobutton.qc:3
entity makeXonoticTextSlider_T(string theCvar, string theTooltip)
Definition: textslider.qc:3
#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 makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
Definition: checkbox.qc:3
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
entity makeXonoticTextSlider(string theCvar)
Definition: textslider.qc:10
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
Definition: checkbox.qc:28
#define COMMANDBUTTON_APPLY
entity makeXonoticDecibelsSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip)
+ Here is the call graph for this function: