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, 15.5)
7 ATTRIB(XonoticAudioSettingsTab, columns, float, 6.2) // added extra .2 for center space
8 ATTRIB(XonoticAudioSettingsTab, hiddenMenuSoundsSlider, entity, NULL)
9 ENDCLASS(XonoticAudioSettingsTab)
10 entity makeXonoticAudioSettingsTab();
14 entity makeXonoticAudioSettingsTab()
17 me = spawnXonoticAudioSettingsTab();
18 me.configureDialog(me);
22 void XonoticAudioSettingsTab_fill(entity me)
27 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "mastervolume");
28 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Master:")));
32 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "bgmvolume");
33 makeMulti(s, "snd_channel8volume");
34 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Music:")));
36 setDependentStringNotEqual(e, "mastervolume", "0");
37 setDependentStringNotEqual(s, "mastervolume", "0");
40 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_staticvolume");
41 makeMulti(s, "snd_channel9volume");
42 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VOL^Ambient:"))));
44 setDependentStringNotEqual(e, "mastervolume", "0");
45 setDependentStringNotEqual(s, "mastervolume", "0");
48 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel0volume");
49 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Info:")));
51 setDependentStringNotEqual(e, "mastervolume", "0");
52 setDependentStringNotEqual(s, "mastervolume", "0");
55 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel3volume");
56 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Items:")));
58 setDependentStringNotEqual(e, "mastervolume", "0");
59 setDependentStringNotEqual(s, "mastervolume", "0");
62 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel6volume");
63 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Pain:")));
65 setDependentStringNotEqual(e, "mastervolume", "0");
66 setDependentStringNotEqual(s, "mastervolume", "0");
69 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel7volume");
70 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Player:")));
72 setDependentStringNotEqual(e, "mastervolume", "0");
73 setDependentStringNotEqual(s, "mastervolume", "0");
76 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel4volume");
77 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Shots:")));
79 setDependentStringNotEqual(e, "mastervolume", "0");
80 setDependentStringNotEqual(s, "mastervolume", "0");
83 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel2volume");
84 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Voice:")));
86 setDependentStringNotEqual(e, "mastervolume", "0");
87 setDependentStringNotEqual(s, "mastervolume", "0");
90 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel1volume");
91 makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba
92 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Weapons:")));
94 setDependentStringNotEqual(e, "mastervolume", "0");
95 setDependentStringNotEqual(s, "mastervolume", "0");
98 me.TD(me, 1, 3, makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
100 me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
102 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
103 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
104 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
105 e.addValue(e, _("8 kHz"), "8000");
106 e.addValue(e, _("11.025 kHz"), "11025");
107 e.addValue(e, _("16 kHz"), "16000");
108 e.addValue(e, _("22.05 kHz"), "22050");
109 e.addValue(e, _("24 kHz"), "24000");
110 e.addValue(e, _("32 kHz"), "32000");
111 e.addValue(e, _("44.1 kHz"), "44100");
112 e.addValue(e, _("48 kHz"), "48000");
113 e.configureXonoticTextSliderValues(e);
115 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Channels:")));
116 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
117 e.addValue(e, _("Mono"), "1");
118 e.addValue(e, _("Stereo"), "2");
119 e.addValue(e, _("2.1"), "3");
120 e.addValue(e, _("4"), "4");
121 e.addValue(e, _("5"), "5");
122 e.addValue(e, _("5.1"), "6");
123 e.addValue(e, _("6.1"), "7");
124 e.addValue(e, _("7.1"), "8");
125 e.configureXonoticTextSliderValues(e);
128 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap stereo output channels")));
129 setDependent(e, "snd_channels", 1.5, 0.5);
131 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
132 setDependent(e, "snd_channels", 1.5, 0.5);
135 me.TD(me, 1, 3, makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound")));
138 me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
140 me.hiddenMenuSoundsSlider = makeXonoticSlider(1, 1, 1, "menu_sounds");
141 me.TD(me, 1, 1.2, makeXonoticSliderCheckBox(0, 1, me.hiddenMenuSoundsSlider, _("Menu sounds")));
142 me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(2, 0, me.hiddenMenuSoundsSlider, _("Focus sounds")));
143 setDependent(e, "menu_sounds", 1, 2);
146 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Time announcer:")));
147 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_announcer_maptime"));
148 e.addValue(e, ZCTX(_("WRN^Disabled")), "0");
149 e.addValue(e, _("1 minute"), "1");
150 e.addValue(e, _("5 minutes"), "2");
151 e.addValue(e, ZCTX(_("WRN^Both")), "3");
152 e.configureXonoticTextSliderValues(e);
154 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Automatic taunts:")));
155 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_autotaunt"));
156 e.addValue(e, _("Never"), "0");
157 e.addValue(e, _("Sometimes"), "0.35");
158 e.addValue(e, _("Often"), "0.65");
159 e.addValue(e, _("Always"), "1");
160 e.configureXonoticTextSliderValues(e);
164 if(cvar("developer"))
165 me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
167 me.gotoRC(me, me.rows - 1, 0);
168 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; snd_attenuation_method_${menu_snd_attenuation_method}", COMMANDBUTTON_APPLY));