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.5)
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(-20, 0, 0.5, "mastervolume");
27 me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Master:"));
31 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "bgmvolume");
32 makeMulti(s, "snd_csqcchannel2volume");
33 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Music:"));
37 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");
38 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Ambient:"));
39 makeMulti(s, "snd_entchannel2volume");
41 setDependentStringNotEqual(e, "volume", "0");
42 setDependentStringNotEqual(s, "volume", "0");
45 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_worldchannel0volume");
46 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Info:"));
47 makeMulti(s, "snd_csqcchannel0volume");
49 setDependentStringNotEqual(e, "volume", "0");
50 setDependentStringNotEqual(s, "volume", "0");
53 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
54 makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume snd_csqcchannel3volume");
55 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Items:"));
57 setDependentStringNotEqual(e, "volume", "0");
58 setDependentStringNotEqual(s, "volume", "0");
61 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel6volume");
62 makeMulti(s, "snd_csqcchannel6volume");
63 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Pain:"));
65 setDependentStringNotEqual(e, "volume", "0");
66 setDependentStringNotEqual(s, "volume", "0");
69 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel7volume");
70 makeMulti(s, "snd_entchannel7volume");
71 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Player:"));
73 setDependentStringNotEqual(e, "volume", "0");
74 setDependentStringNotEqual(s, "volume", "0");
77 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel4volume");
78 makeMulti(s, "snd_playerchannel4volume snd_entchannel6volume snd_csqcchannel4volume");
79 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Shots:"));
81 setDependentStringNotEqual(e, "volume", "0");
82 setDependentStringNotEqual(s, "volume", "0");
85 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel2volume");
86 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Voice:"));
88 setDependentStringNotEqual(e, "volume", "0");
89 setDependentStringNotEqual(s, "volume", "0");
92 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_playerchannel1volume");
93 makeMulti(s, "snd_playerchannel5volume snd_entchannel1volume snd_entchannel5volume");
94 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Weapons:"));
96 setDependentStringNotEqual(e, "volume", "0");
97 setDependentStringNotEqual(s, "volume", "0");
100 me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
101 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Frequency:"));
102 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
103 e.addValue(e, "8 kHz", "8000");
104 e.addValue(e, "11.025 kHz", "11025");
105 e.addValue(e, "16 kHz", "16000");
106 e.addValue(e, "22.05 kHz", "22050");
107 e.addValue(e, "24 kHz", "24000");
108 e.addValue(e, "32 kHz", "32000");
109 e.addValue(e, "44.1 kHz", "44100");
110 e.addValue(e, "48 kHz", "48000");
111 e.configureXonoticTextSliderValues(e);
113 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Channels:"));
114 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
115 e.addValue(e, "Mono", "1");
116 e.addValue(e, "Stereo", "2");
117 e.addValue(e, "2.1", "3");
118 e.addValue(e, "3.1", "4");
119 e.addValue(e, "4.1", "5");
120 e.addValue(e, "5.1", "6");
121 e.addValue(e, "6.1", "7");
122 e.addValue(e, "7.1", "8");
123 e.configureXonoticTextSliderValues(e);
126 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_swapstereo", "Swap Stereo"));
127 setDependent(e, "snd_channels", 1.5, 0.5);
130 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", "Headphone friendly mode"));
131 setDependent(e, "snd_channels", 1.5, 0.5);
134 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Spatial voices:"));
135 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", "None"));
136 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", "Taunts"));
137 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", "All"));
140 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Taunt range:"));
141 setDependent(e, "cl_voice_directional", 0.5, -0.5);
142 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
143 e.addValue(e, "Very short", "3");
144 e.addValue(e, "Short", "2");
145 e.addValue(e, "Normal", "0.5");
146 e.addValue(e, "Long", "0.25");
147 e.addValue(e, "Full", "0.015625");
148 e.configureXonoticTextSliderValues(e);
149 setDependent(e, "cl_voice_directional", 0.5, -0.5);
151 sl = makeXonoticSlider(0.15, 1, 0.05, "cl_autotaunt");
152 sl.valueDisplayMultiplier = 100;
154 me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "Automatic taunts"));
155 if(sl.value != e.savedValue)
156 e.savedValue = 0.65; // default
159 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Frequency:"));
163 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Time warning:"));
164 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_sound_maptime_warning"));
165 e.addValue(e, "None", "0");
166 e.addValue(e, "1 minute", "1");
167 e.addValue(e, "5 minutes", "2");
168 e.addValue(e, "Both", "3");
169 e.configureXonoticTextSliderValues(e);
171 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", "Hit indicator"));
173 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", "Menu sounds"));
175 me.gotoRC(me, me.rows - 1, 0);
176 me.TD(me, 1, me.columns, makeXonoticCommandButton("Apply immediately", '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));