Skip to content

Commit

Permalink
[classic] Update interface options skin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gethe committed May 30, 2022
1 parent fc7ba2e commit 8d71209
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 37 deletions.
25 changes: 21 additions & 4 deletions Skin/Classic/Interface_TBC/FrameXML/InterfaceOptionsPanels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,26 @@ function private.FrameXML.InterfaceOptionsPanels()
local Accessibility = _G.InterfaceOptionsAccessibilityPanel
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.MovePad)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelCinematicSubtitles)
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.ColorblindMode)
--Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.OverrideFadeOut)
--Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelQuestTextContrast)
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.SpeechToTextCheckbox)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelTextToSpeech)
Skin.UIPanelButtonTemplate(_G.InterfaceOptionsAccessibilityPanelConfigureTextToSpeech)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelRemoteTextToSpeech)

Skin.UIDropDownMenuTemplate(Accessibility.RemoteTextToSpeechVoiceDropdown)
Skin.UIPanelButtonTemplate(Accessibility.RemoteTextToSpeechVoicePlaySample)
Skin.UIDropDownMenuTemplate(Accessibility.MotionSicknessDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.ShakeIntensityDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.CursorSizeDropdown)

local FilterExamples = Accessibility.ColorblindFilterExamples
----------------
-- Colorblind --
----------------
local Colorblind = _G.InterfaceOptionsColorblindPanel
--Skin.InterfaceOptionsCheckButtonTemplate(Colorblind.ColorblindMode)

local FilterExamples = private.hasAPI and Colorblind.ColorblindFilterExamples or Accessibility.ColorblindFilterExamples
FilterExamples.Hostile:SetTexCoord(0.2, 0.8, 0.4, 0.6)
FilterExamples.Hostile:SetPoint("BOTTOMLEFT", 9, 158)
FilterExamples.Hostile:SetSize(103, 10)
Expand All @@ -191,8 +208,8 @@ function private.FrameXML.InterfaceOptionsPanels()
FilterExamples.Friendly:SetSize(103, 10)
FilterExamples.FriendlyLabel:SetPoint("BOTTOMLEFT", FilterExamples.Friendly, "TOPLEFT", 1, 7)

Skin.UIDropDownMenuTemplate(Accessibility.ColorblindFilterDropDown)
Skin.OptionsSliderTemplate(_G.InterfaceOptionsAccessibilityPanelColorblindStrengthSlider)
Skin.UIDropDownMenuTemplate(Colorblind.ColorblindFilterDropDown)
Skin.OptionsSliderTemplate(_G.InterfaceOptionsColorblindPanelColorblindStrengthSlider)

-------------
-- Section --
Expand Down
5 changes: 0 additions & 5 deletions Skin/Classic/Interface_TBC/FrameXML/UIParent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,5 @@ end
function private.FrameXML.UIParent()
_G.hooksecurefunc("SetPortraitToTexture", Hook.SetPortraitToTexture)
_G.hooksecurefunc("BuildIconArray", Hook.BuildIconArray)

-- Blizzard doesn't create the chat bubbles in lua, so we're calling it here
if private.FrameXML.ChatBubbles then
private.FrameXML.ChatBubbles()
end
end
print("UIParent", private.FrameXML.UIParent)
37 changes: 14 additions & 23 deletions Skin/Classic/Interface_Vanilla/FrameXML/InterfaceOptionsPanels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,18 @@ function private.FrameXML.InterfaceOptionsPanels()
local Accessibility = _G.InterfaceOptionsAccessibilityPanel
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.MovePad)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelCinematicSubtitles)
if private.hasAPI then
--Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.OverrideFadeOut)
--Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelQuestTextContrast)
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.SpeechToTextCheckbox)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelTextToSpeech)
Skin.UIPanelButtonTemplate(_G.InterfaceOptionsAccessibilityPanelConfigureTextToSpeech)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelRemoteTextToSpeech)

Skin.UIDropDownMenuTemplate(Accessibility.RemoteTextToSpeechVoiceDropdown)
Skin.UIPanelButtonTemplate(Accessibility.RemoteTextToSpeechVoicePlaySample)
Skin.UIDropDownMenuTemplate(Accessibility.MotionSicknessDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.ShakeIntensityDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.CursorSizeDropdown)
else
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.ColorblindMode)
end
--Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.OverrideFadeOut)
--Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelQuestTextContrast)
Skin.InterfaceOptionsCheckButtonTemplate(Accessibility.SpeechToTextCheckbox)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelTextToSpeech)
Skin.UIPanelButtonTemplate(_G.InterfaceOptionsAccessibilityPanelConfigureTextToSpeech)
Skin.InterfaceOptionsCheckButtonTemplate(_G.InterfaceOptionsAccessibilityPanelRemoteTextToSpeech)

Skin.UIDropDownMenuTemplate(Accessibility.RemoteTextToSpeechVoiceDropdown)
Skin.UIPanelButtonTemplate(Accessibility.RemoteTextToSpeechVoicePlaySample)
Skin.UIDropDownMenuTemplate(Accessibility.MotionSicknessDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.ShakeIntensityDropdown)
Skin.UIDropDownMenuTemplate(Accessibility.CursorSizeDropdown)

----------------
-- Colorblind --
Expand All @@ -208,13 +204,8 @@ function private.FrameXML.InterfaceOptionsPanels()
FilterExamples.Friendly:SetSize(103, 10)
FilterExamples.FriendlyLabel:SetPoint("BOTTOMLEFT", FilterExamples.Friendly, "TOPLEFT", 1, 7)

if private.hasAPI then
Skin.UIDropDownMenuTemplate(Colorblind.ColorblindFilterDropDown)
Skin.OptionsSliderTemplate(_G.InterfaceOptionsColorblindPanelColorblindStrengthSlider)
else
Skin.UIDropDownMenuTemplate(Accessibility.ColorblindFilterDropDown)
Skin.OptionsSliderTemplate(_G.InterfaceOptionsAccessibilityPanelColorblindStrengthSlider)
end
Skin.UIDropDownMenuTemplate(Colorblind.ColorblindFilterDropDown)
Skin.OptionsSliderTemplate(_G.InterfaceOptionsColorblindPanelColorblindStrengthSlider)

-------------
-- Section --
Expand Down
5 changes: 0 additions & 5 deletions Skin/Classic/Interface_Vanilla/FrameXML/UIParent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,4 @@ end
function private.FrameXML.UIParent()
_G.hooksecurefunc("SetPortraitToTexture", Hook.SetPortraitToTexture)
_G.hooksecurefunc("BuildIconArray", Hook.BuildIconArray)

-- Blizzard doesn't create the chat bubbles in lua, so we're calling it here
if private.FrameXML.ChatBubbles then
private.FrameXML.ChatBubbles()
end
end

0 comments on commit 8d71209

Please sign in to comment.