if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
else
PlaySound("igMainMenuOptionCheckBoxOff");
end
AudioOptionsPanel_CheckButton_OnClick(self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableAllSound";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(PLAYBACK);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableSFX";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableErrorSpeech";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(AudioOptionsSoundPanelSoundEffects, self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableEmoteSounds";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(AudioOptionsSoundPanelSoundEffects, self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnablePetSounds";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(AudioOptionsSoundPanelSoundEffects, self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableMusic";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_ZoneMusicNoDelay";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(AudioOptionsSoundPanelMusic, self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableAmbience";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableSoundWhenGameIsInBG";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableReverb";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableSoftwareHRTF";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableDSPEffects";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_OutputQuality";
self.restart = true;
_G[self:GetName().."Text"]:SetFontObject("GameFontNormalSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local prevValue = self.value;
BlizzardOptionsPanel_Slider_OnValueChanged(self, value);
if (self:GetParent():IsShown() and self.restart and prevValue and prevValue ~= value) then
AudioOptionsFrame_AudioRestart();
end
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(HARDWARE);
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
AudioOptionsSoundPanelHardwareDropDown_OnLoad(self);
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT");
GameTooltip:SetText(OPTION_TOOLTIP_SOUND_OUTPUT, nil, nil, nil, nil, 1);
GameTooltip:Show();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_NumChannels";
self.restart = true;
_G[self:GetName().."Text"]:SetFontObject("GameFontNormalSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local prevValue = self.value;
self.value = value;
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
if (self:GetParent():IsShown() and self.restart and prevValue and prevValue ~= value) then
AudioOptionsFrame_AudioRestart();
end
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "Sound_EnableHardware";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(VOLUME);
local name = self:GetName();
_G[name.."Low"]:Hide();
_G[name.."High"]:Hide();
self.label = _G[name .. "Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_MasterVolume";
_G[name.."Text"]:SetFontObject("GameFontNormalSmall");
_G[name.."Text"]:SetPoint("BOTTOM", self, "TOP", 0, 4);
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.value = value;
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
self.label:SetText(tostring(ceil(value * 100)).."%");
local name = self:GetName();
local label = _G[name.."Low"];
label:ClearAllPoints();
label:SetPoint("BOTTOMLEFT", "$parent", "TOPLEFT", -2, 4);
label = _G[name.."High"];
label:ClearAllPoints();
label:SetPoint("BOTTOMRIGHT", "$parent", "TOPRIGHT", 4, 4);
_G[name.."Text"]:Hide();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_SFXVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
_G[name.."Low"]:Hide()
_G[name.."High"]:Hide();
_G[name.."Text"]:Hide();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_MusicVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
_G[name.."Low"]:Hide();
_G[name.."High"]:Hide();
_G[name.."Text"]:Hide();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "Sound_AmbienceVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetWidth(_G[self:GetName().."Text"]:GetWidth());
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(VOICECHAT_DISABLED_TEXT, nil, nil, nil, nil, 1);
GameTooltip:Hide();
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "EnableVoiceChat";
self.setFunc = AudioOptionsVoicePanelEnableVoice_UpdateControls;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(VOICE_TALKING);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "EnableMicrophone";
self.setFunc = AudioOptionsVoicePanelEnableMicrophone_UpdateControls;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
AudioOptionsVoicePanelInputDeviceDropDown_OnLoad(self);
if ( UIDropDownMenu_IsEnabled(self) ) then
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT");
GameTooltip:SetText(OPTION_TOOLTIP_VOICE_INPUT, nil, nil, nil, nil, 1);
GameTooltip:Show();
end
local name = self:GetName();
local label = _G[name.."Low"];
label:Hide();
label = _G[name.."High"];
label:Hide();
self.label = _G[name.."Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "OutboundChatVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.value = value;
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
local min, max = self:GetMinMaxValues();
value, max = (value - min), (max - min);
self.label:SetText(tostring(ceil((value/max) * 100)).."%");
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15, 0.5);
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
AudioOptionsVoicePanelChatModeDropDown_OnLoad(self);
if ( UIDropDownMenu_IsEnabled(self) and self.tooltip ) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(self.tooltip, nil, nil, nil, nil, 1);
GameTooltip:Show();
end
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "PushToTalkSound";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent():GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "VoiceActivationSensitivity";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent():GetParent());
self.value = value;
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(VOICE_LISTENING);
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
AudioOptionsVoicePanelOutputDeviceDropDown_OnLoad(self);
self:RegisterEvent("VOICE_CHAT_ENABLED_UPDATE");
if ( UIDropDownMenu_IsEnabled(self) ) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(OPTION_TOOLTIP_VOICE_OUTPUT, nil, nil, nil, nil, 1);
GameTooltip:Show();
end
local name = self:GetName();
local label = _G[name.."Low"];
label:Hide();
label = _G[name.."High"];
label:Hide();
self.label = _G[name.."Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "InboundChatVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.value = value;
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
local min, max = self:GetMinMaxValues();
value, max = (value - min), (max - min);
self.label:SetText(tostring(ceil((value/max) * 100)).."%");
local name = self:GetName();
local label = _G[name.."Low"];
label:Hide();
label = _G[name.."High"];
label:Hide();
self.label = _G[name.."Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "ChatSoundVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
local label = _G[name.."Low"];
label:Hide();
label = _G[name.."High"];
label:Hide();
self.label = _G[name.."Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "ChatMusicVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
local label = _G[name.."Low"];
label:Hide();
label = _G[name.."High"];
label:Hide();
self.label = _G[name.."Label"];
self.type = CONTROLTYPE_SLIDER;
self.cvar = "ChatAmbienceVolume";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());