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_channel8volume");
33 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Music:")));
35 setDependentStringNotEqual(e, "mastervolume", "0");
36 setDependentStringNotEqual(s, "mastervolume", "0");
39 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_staticvolume");
40 makeMulti(s, "snd_channel9volume");
41 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, ZCTX(_("VOL^Ambient:"))));
43 setDependentStringNotEqual(e, "mastervolume", "0");
44 setDependentStringNotEqual(s, "mastervolume", "0");
47 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel0volume");
48 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Info:")));
50 setDependentStringNotEqual(e, "mastervolume", "0");
51 setDependentStringNotEqual(s, "mastervolume", "0");
54 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel3volume");
55 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Items:")));
57 setDependentStringNotEqual(e, "mastervolume", "0");
58 setDependentStringNotEqual(s, "mastervolume", "0");
61 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel6volume");
62 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Pain:")));
64 setDependentStringNotEqual(e, "mastervolume", "0");
65 setDependentStringNotEqual(s, "mastervolume", "0");
68 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel7volume");
69 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Player:")));
71 setDependentStringNotEqual(e, "mastervolume", "0");
72 setDependentStringNotEqual(s, "mastervolume", "0");
75 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel4volume");
76 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Shots:")));
78 setDependentStringNotEqual(e, "mastervolume", "0");
79 setDependentStringNotEqual(s, "mastervolume", "0");
82 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel2volume");
83 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Voice:")));
85 setDependentStringNotEqual(e, "mastervolume", "0");
86 setDependentStringNotEqual(s, "mastervolume", "0");
89 s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_channel1volume");
90 makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba
91 me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, _("Weapons:")));
93 setDependentStringNotEqual(e, "mastervolume", "0");
94 setDependentStringNotEqual(s, "mastervolume", "0");
97 me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
98 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Frequency:")));
99 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
100 e.addValue(e, _("8 kHz"), "8000");
101 e.addValue(e, _("11.025 kHz"), "11025");
102 e.addValue(e, _("16 kHz"), "16000");
103 e.addValue(e, _("22.05 kHz"), "22050");
104 e.addValue(e, _("24 kHz"), "24000");
105 e.addValue(e, _("32 kHz"), "32000");
106 e.addValue(e, _("44.1 kHz"), "44100");
107 e.addValue(e, _("48 kHz"), "48000");
108 e.configureXonoticTextSliderValues(e);
110 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Channels:")));
111 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
112 e.addValue(e, _("Mono"), "1");
113 e.addValue(e, _("Stereo"), "2");
114 e.addValue(e, _("2.1"), "3");
115 e.addValue(e, _("4"), "4");
116 e.addValue(e, _("5"), "5");
117 e.addValue(e, _("5.1"), "6");
118 e.addValue(e, _("6.1"), "7");
119 e.addValue(e, _("7.1"), "8");
120 e.configureXonoticTextSliderValues(e);
123 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap Stereo")));
124 setDependent(e, "snd_channels", 1.5, 0.5);
127 me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
128 setDependent(e, "snd_channels", 1.5, 0.5);
131 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
132 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", ZCTX(_("VOCS^None"))));
133 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", ZCTX(_("VOCS^Taunts"))));
134 me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", ZCTX(_("VOCS^All"))));
137 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Taunt range:")));
138 setDependent(e, "cl_voice_directional", 0.5, -0.5);
139 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
140 e.addValue(e, ZCTX(_("RNG^Very short")), "3");
141 e.addValue(e, ZCTX(_("RNG^Short")), "2");
142 e.addValue(e, ZCTX(_("RNG^Normal")), "0.5");
143 e.addValue(e, ZCTX(_("RNG^Long")), "0.25");
144 e.addValue(e, ZCTX(_("RNG^Full")), "0.015625");
145 e.configureXonoticTextSliderValues(e);
146 setDependent(e, "cl_voice_directional", 0.5, -0.5);
148 sl = makeXonoticSlider(0.15, 1, 0.05, "cl_autotaunt");
149 sl.valueDisplayMultiplier = 100;
151 me.TD(me, 1, 3, e = makeXonoticSliderCheckBox(0, 1, sl, _("Automatic taunts")));
152 if(sl.value != e.savedValue)
153 e.savedValue = 0.65; // default
156 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Frequency:")));
160 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time warning:")));
161 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_sound_maptime_warning"));
162 e.addValue(e, ZCTX(_("WRN^None")), "0");
163 e.addValue(e, _("1 minute"), "1");
164 e.addValue(e, _("5 minutes"), "2");
165 e.addValue(e, ZCTX(_("WRN^Both")), "3");
166 e.configureXonoticTextSliderValues(e);
168 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", _("Hit indicator")));
170 me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
172 me.gotoRC(me, me.rows - 1, 0);
173 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));