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 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, 0.4, "mastervolume");
27 me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Master:")));
31 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "bgmvolume");
32 makeMulti(s, "snd_channel8volume");
33 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Music:")));
35 setDependentStringNotEqual(e, "mastervolume", "0");
36 setDependentStringNotEqual(s, "mastervolume", "0");
39 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_staticvolume");
40 makeMulti(s, "snd_channel9volume");
41 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VOL^Ambient:"))));
43 setDependentStringNotEqual(e, "mastervolume", "0");
44 setDependentStringNotEqual(s, "mastervolume", "0");
47 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel0volume");
48 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Info:")));
50 setDependentStringNotEqual(e, "mastervolume", "0");
51 setDependentStringNotEqual(s, "mastervolume", "0");
54 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel3volume");
55 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Items:")));
57 setDependentStringNotEqual(e, "mastervolume", "0");
58 setDependentStringNotEqual(s, "mastervolume", "0");
61 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel6volume");
62 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Pain:")));
64 setDependentStringNotEqual(e, "mastervolume", "0");
65 setDependentStringNotEqual(s, "mastervolume", "0");
68 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel7volume");
69 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Player:")));
71 setDependentStringNotEqual(e, "mastervolume", "0");
72 setDependentStringNotEqual(s, "mastervolume", "0");
75 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel4volume");
76 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Shots:")));
78 setDependentStringNotEqual(e, "mastervolume", "0");
79 setDependentStringNotEqual(s, "mastervolume", "0");
82 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel2volume");
83 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Voice:")));
85 setDependentStringNotEqual(e, "mastervolume", "0");
86 setDependentStringNotEqual(s, "mastervolume", "0");
89 s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel1volume");
90 makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba
91 me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Weapons:")));
93 setDependentStringNotEqual(e, "mastervolume", "0");
94 setDependentStringNotEqual(s, "mastervolume", "0");
97 me.TD(me, 1, 3, makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
99 me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
101 me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
102 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
103 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
104 e.addValue(e, _("8 kHz"), "8000");
105 e.addValue(e, _("11.025 kHz"), "11025");
106 e.addValue(e, _("16 kHz"), "16000");
107 e.addValue(e, _("22.05 kHz"), "22050");
108 e.addValue(e, _("24 kHz"), "24000");
109 e.addValue(e, _("32 kHz"), "32000");
110 e.addValue(e, _("44.1 kHz"), "44100");
111 e.addValue(e, _("48 kHz"), "48000");
112 e.configureXonoticTextSliderValues(e);
114 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Channels:")));
115 me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels"));
116 e.addValue(e, _("Mono"), "1");
117 e.addValue(e, _("Stereo"), "2");
118 e.addValue(e, _("2.1"), "3");
119 e.addValue(e, _("4"), "4");
120 e.addValue(e, _("5"), "5");
121 e.addValue(e, _("5.1"), "6");
122 e.addValue(e, _("6.1"), "7");
123 e.addValue(e, _("7.1"), "8");
124 e.configureXonoticTextSliderValues(e);
127 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap stereo output channels")));
128 setDependent(e, "snd_channels", 1.5, 0.5);
130 me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
131 setDependent(e, "snd_channels", 1.5, 0.5);
134 me.TD(me, 1, 3, makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound")));
137 me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound")));
139 me.TD(me, 1, 3, makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
142 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Time announcer:")));
143 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_announcer_maptime"));
144 e.addValue(e, ZCTX(_("WRN^Disabled")), "0");
145 e.addValue(e, _("1 minute"), "1");
146 e.addValue(e, _("5 minutes"), "2");
147 e.addValue(e, ZCTX(_("WRN^Both")), "3");
148 e.configureXonoticTextSliderValues(e);
150 me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Automatic taunts:")));
151 me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_autotaunt"));
152 e.addValue(e, _("Never"), "0");
153 e.addValue(e, _("Sometimes"), "0.35");
154 e.addValue(e, _("Often"), "0.65");
155 e.addValue(e, _("Always"), "1");
156 e.configureXonoticTextSliderValues(e);
160 if(cvar("developer"))
161 me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
163 me.gotoRC(me, me.rows - 1, 0);
164 me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; snd_attenuation_method_${menu_snd_attenuation_method}", COMMANDBUTTON_APPLY));