2 CLASS(XonoticAudioSettingsTab) EXTENDS(XonoticTab)
3 METHOD(XonoticAudioSettingsTab, fill, void(entity))
4 ATTRIB(XonoticAudioSettingsTab, title, string, _("Audio"))
5 ATTRIB(XonoticAudioSettingsTab, intendedWidth, float, 0.9)
6 ATTRIB(XonoticAudioSettingsTab, rows, float, 17)
7 ATTRIB(XonoticAudioSettingsTab, columns, float, 6.2) // added extra .2 for center space
8 ENDCLASS(XonoticAudioSettingsTab)
9 entity makeXonoticAudioSettingsTab();
13 entity makeXonoticAudioSettingsTab()
16 me = spawnXonoticAudioSettingsTab();
17 me.configureDialog(me);
21 void XonoticAudioSettingsTab_fill(entity me)
26 s = makeXonoticDecibelsSlider(-40, 0, 1, "mastervolume");
27 me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Master:")));
28 if(s.value != e.savedValue)
29 e.savedValue = 0; // default
33 s = makeXonoticDecibelsSlider(-40, 0, 1, "bgmvolume");
34 makeMulti(s, "snd_channel8volume");
35 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Music:")));
36 if(s.value != e.savedValue)
37 e.savedValue = 0; // default
39 setDependentStringNotEqual(e, "mastervolume", "0");
40 setDependentStringNotEqual(s, "mastervolume", "0");
43 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_staticvolume");
44 makeMulti(s, "snd_channel9volume");
45 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, ZCTX(_("VOL^Ambient:"))));
46 if(s.value != e.savedValue)
47 e.savedValue = 0; // default
49 setDependentStringNotEqual(e, "mastervolume", "0");
50 setDependentStringNotEqual(s, "mastervolume", "0");
53 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel0volume");
54 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Info:")));
55 if(s.value != e.savedValue)
56 e.savedValue = 0; // default
58 setDependentStringNotEqual(e, "mastervolume", "0");
59 setDependentStringNotEqual(s, "mastervolume", "0");
62 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel3volume");
63 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Items:")));
64 if(s.value != e.savedValue)
65 e.savedValue = 0; // default
67 setDependentStringNotEqual(e, "mastervolume", "0");
68 setDependentStringNotEqual(s, "mastervolume", "0");
71 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel6volume");
72 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Pain:")));
73 if(s.value != e.savedValue)
74 e.savedValue = 0; // default
76 setDependentStringNotEqual(e, "mastervolume", "0");
77 setDependentStringNotEqual(s, "mastervolume", "0");
80 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel7volume");
81 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Player:")));
82 if(s.value != e.savedValue)
83 e.savedValue = 0; // default
85 setDependentStringNotEqual(e, "mastervolume", "0");
86 setDependentStringNotEqual(s, "mastervolume", "0");
89 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel4volume");
90 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Shots:")));
91 if(s.value != e.savedValue)
92 e.savedValue = 0; // default
94 setDependentStringNotEqual(e, "mastervolume", "0");
95 setDependentStringNotEqual(s, "mastervolume", "0");
98 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel2volume");
99 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Voice:")));
100 if(s.value != e.savedValue)
101 e.savedValue = 0; // default
103 setDependentStringNotEqual(e, "mastervolume", "0");
104 setDependentStringNotEqual(s, "mastervolume", "0");
107 s = makeXonoticDecibelsSlider(-40, 0, 1, "snd_channel1volume");
108 makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba
109 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Weapons:")));
110 if(s.value != e.savedValue)
111 e.savedValue = 0; // default
113 setDependentStringNotEqual(e, "mastervolume", "0");
114 setDependentStringNotEqual(s, "mastervolume", "0");
117 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
119 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
121 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
122 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Frequency:")));
123 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
124 e.addValue(e, _("8 kHz"), "8000");
125 e.addValue(e, _("11.025 kHz"), "11025");
126 e.addValue(e, _("16 kHz"), "16000");
127 e.addValue(e, _("22.05 kHz"), "22050");
128 e.addValue(e, _("24 kHz"), "24000");
129 e.addValue(e, _("32 kHz"), "32000");
130 e.addValue(e, _("44.1 kHz"), "44100");
131 e.addValue(e, _("48 kHz"), "48000");
132 e.configureXonoticTextSliderValues(e);
134 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Channels:")));
135 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
136 e.addValue(e, _("Mono"), "1");
137 e.addValue(e, _("Stereo"), "2");
138 e.addValue(e, _("2.1"), "3");
139 e.addValue(e, _("4"), "4");
140 e.addValue(e, _("5"), "5");
141 e.addValue(e, _("5.1"), "6");
142 e.addValue(e, _("6.1"), "7");
143 e.addValue(e, _("7.1"), "8");
144 e.configureXonoticTextSliderValues(e);
146 me.TD(me, 1, 1.2, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap Stereo")));
147 setDependent(e, "snd_channels", 1.5, 0.5);
148 me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
149 setDependent(e, "snd_channels", 1.5, 0.5);
151 /*me.TR(me); // Samual: I REALLY don't think these are relevant to anyone, and just clutter up the menu pointlessly. The defaults are fine.
152 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
153 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", ZCTX(_("VOCS^None"))));
154 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", ZCTX(_("VOCS^Taunts"))));
155 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", ZCTX(_("VOCS^All"))));
158 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Taunt range:")));
159 setDependent(e, "cl_voice_directional", 0.5, -0.5);
160 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
161 e.addValue(e, ZCTX(_("RNG^Very short")), "3");
162 e.addValue(e, ZCTX(_("RNG^Short")), "2");
163 e.addValue(e, ZCTX(_("RNG^Normal")), "0.5");
164 e.addValue(e, ZCTX(_("RNG^Long")), "0.25");
165 e.addValue(e, ZCTX(_("RNG^Full")), "0.015625");
166 e.configureXonoticTextSliderValues(e);
167 setDependent(e, "cl_voice_directional", 0.5, -0.5);
170 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound")));
172 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
174 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
177 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time announcer:")));
178 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_announcer_maptime"));
179 e.addValue(e, ZCTX(_("WRN^Disabled")), "0");
180 e.addValue(e, _("1 minute"), "1");
181 e.addValue(e, _("5 minutes"), "2");
182 e.addValue(e, ZCTX(_("WRN^Both")), "3");
183 e.configureXonoticTextSliderValues(e);
186 sl = makeXonoticSlider(0.15, 1, 0.05, "cl_autotaunt");
187 sl.valueDisplayMultiplier = 100;
189 me.TD(me, 1, 3, e = makeXonoticSliderCheckBox(0, 1, sl, _("Automatic taunts")));
190 if(sl.value != e.savedValue)
191 e.savedValue = 0.65; // default
194 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Frequency:")));
198 if(cvar("developer"))
199 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
202 me.gotoRC(me, me.rows - 1, 0);
203 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; snd_attenuation_method_$menu_snd_attenuation_method; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));