if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
else
PlaySound("igMainMenuOptionCheckBoxOff");
end
BlizzardOptionsPanel_CheckButton_OnClick(self);
VideoOptionsFrameApply:Enable();
VideoOptionsResolutionPanel_OnLoad(self);
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
VideoOptionsResolutionPanelResolutionDropDown_OnLoad(self);
local btn = _G[self:GetName().."Button"];
btn:ClearAllPoints();
btn:SetPoint("RIGHT", self, "RIGHT", -5, 0);
btn:SetSize(12, 12);
local text = _G[self:GetName().."Text"];
text:ClearAllPoints();
text:SetPoint("LEFT", self, "LEFT", 8, 1);
text:SetPoint("RIGHT", btn, "LEFT", -10, -2);
_G[self:GetName().."Left"]:Hide();
_G[self:GetName().."Middle"]:Hide();
_G[self:GetName().."Right"]:Hide();
OptionsTooltip:SetOwner(self);
OptionsTooltip:SetText(OPTION_TOOLTIP_USE_RESOLUTION);
OptionsTooltip:Hide();
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
VideoOptionsResolutionPanelRefreshDropDown_OnLoad(self);
local btn = _G[self:GetName().."Button"];
btn:ClearAllPoints();
btn:SetPoint("RIGHT", self, "RIGHT", -45, 0);
btn:SetSize(12, 12);
local text = _G[self:GetName().."Text"];
text:ClearAllPoints();
text:SetPoint("LEFT", self, "LEFT", 8, 1);
text:SetPoint("RIGHT", btn, "LEFT", -15, -2);
_G[self:GetName().."Left"]:Hide();
_G[self:GetName().."Middle"]:Hide();
_G[self:GetName().."Right"]:Hide();
OptionsTooltip:SetOwner(self);
OptionsTooltip:SetText(OPTION_TOOLTIP_USE_REFRESH);
OptionsTooltip:Hide();
self.type = CONTROLTYPE_DROPDOWN;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
VideoOptionsResolutionPanelMultiSampleDropDown_OnLoad(self);
local btn = _G[self:GetName().."Button"];
btn:ClearAllPoints();
btn:SetPoint("RIGHT", self, "RIGHT", -5, 0);
btn:SetSize(12, 12);
local text = _G[self:GetName().."Text"];
text:ClearAllPoints();
text:SetPoint("LEFT", self, "LEFT", 8, 1);
text:SetPoint("RIGHT", btn, "LEFT", -10, -2);
_G[self:GetName().."Left"]:Hide();
_G[self:GetName().."Middle"]:Hide();
_G[self:GetName().."Right"]:Hide();
OptionsTooltip:SetOwner(self);
OptionsTooltip:SetText(OPTION_TOOLTIP_MULTISAMPLING);
OptionsTooltip:Hide();
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxVSync";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxTripleBuffer";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(VideoOptionsResolutionPanelVSync, self);
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxCursor";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxFixLag";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxWindow";
self.restart = true;
self.setFunc = VideoOptionsResolutionPanel_SetWindowed;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxMaximize";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(VideoOptionsResolutionPanelWindowed, self);
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "windowResizeLock";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(VideoOptionsResolutionPanelWindowed, self);
if ( IsMacClient() ) then
self:Hide();
end
self:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check");
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:SetText(OPTIONS_BRIGHTNESS);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "desktopGamma";
self.setFunc = VideoOptionsResolutionPanel_SetGamma;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_CheckButton_OnClick(self);
if ( self:GetParent():IsShown() ) then
local value;
if ( self:GetChecked() ) then
value = 1;
else
value = 0;
SetGamma(VideoOptionsResolutionPanelGammaSlider:GetValue());
end
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
VideoOptionsFrameApply:Enable();
self.type = CONTROLTYPE_SLIDER;
self.label = "gamma";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
SetGamma(value);
end
self.GetCurrentValue = function (self) return GetGamma(); end;
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.newValue = value;
if ( self:GetParent():IsShown() ) then
SetGamma(value);
end
VideoOptionsFrameApply:Enable();
VideoOptionsEffectsPanel_OnLoad(self);
self:SetBackdropBorderColor(0.4, 0.4, 0.4);
self:SetBackdropColor(0.15, 0.15, 0.15);
_G[self:GetName().."Title"]:Hide();
local name = self:GetName();
_G[name.."High"]:SetPoint("TOPRIGHT", "$parent", "BOTTOMRIGHT", -65, 3);
_G[name.."High"]:SetText(VIDEO_QUALITY_LABEL5);
_G[name.."Text"]:SetFontObject("OptionsFontSmall");
self.type = CONTROLTYPE_SLIDER;
self.label = "quality";
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.newValue = value;
if ( self:GetParent():IsShown() ) then
VideoOptionsEffectsPanel_SetVideoQuality(value);
end
self.type = CONTROLTYPE_SLIDER;
self.cvar = "farclip";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.label = "TerrainMip";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
SetTerrainMip(value);
end
self.GetCurrentValue = function (self) return GetTerrainMip() end;
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "particleDensity";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[name.."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "extShadowQuality";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[name.."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "environmentDetail";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "groundEffectDensity";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "groundEffectDist";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "BaseMip";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
local min, max = self:GetMinMaxValues();
BlizzardOptionsPanel_SetCVarSafe(self.cvar, max - value + min); --With this cvar, lower is actually better quality.
end
self.GetCurrentValue = function (self)
local value = BlizzardOptionsPanel_GetCVarSafe(self.cvar);
local min, max = self:GetMinMaxValues();
return min - value + max;
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "textureFilteringMode";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "weatherDensity";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_SLIDER;
self.cvar = "componentTextureLevel";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[self:GetName().."Text"]:SetFontObject("OptionsFontSmall");
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("");
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "specular";
self.restart = true;
self.setFunc = VideoOptionsEffectsPanel_UpdateVideoQuality;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "ffxGlow";
self.setFunc = VideoOptionsEffectsPanel_UpdateVideoQuality;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "ffxDeath";
self.setFunc = VideoOptionsEffectsPanel_UpdateVideoQuality;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "projectedTextures";
self.setFunc = VideoOptionsEffectsPanel_UpdateVideoQuality;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
VideoOptionsStereoPanel_OnLoad(self);
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxStereoEnabled";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
self.type = CONTROLTYPE_CHECKBOX;
self.cvar = "gxCursor";
self.restart = true;
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "gxStereoConvergence";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[name.."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(VideoOptionsStereoPanelEnabled, self);
self.newValue = self:GetValue();
BlizzardOptionsPanel_SetCVarSafe(self.cvar, self:GetValue());
VideoOptionsFrameApply:Enable();
local name = self:GetName();
self.type = CONTROLTYPE_SLIDER;
self.cvar = "gxStereoSeparation";
self.SetDisplayValue = self.SetValue;
self.SetValue = function (self, value)
self:SetDisplayValue(value);
BlizzardOptionsPanel_SetCVarSafe(self.cvar, value);
end
_G[name.."Text"]:SetFontObject("OptionsFontSmall");
BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
BlizzardOptionsPanel_SetupDependentControl(VideoOptionsStereoPanelEnabled, self);
self.newValue = self:GetValue();
BlizzardOptionsPanel_SetCVarSafe(self.cvar, self:GetValue());
VideoOptionsFrameApply:Enable();