mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-24 13:00:50 +00:00
Skin ClassicAPI's Interface Options frame and its option controls
SkinCollapseButton's icon no longer takes the mouse, so clicks reach the button under it.
This commit is contained in:
@@ -683,6 +683,7 @@ function pfUI.api.SkinCollapseButton(button, all)
|
|||||||
b.icon:SetSize(size, size)
|
b.icon:SetSize(size, size)
|
||||||
b.icon:SetPoint("LEFT", 2, 2)
|
b.icon:SetPoint("LEFT", 2, 2)
|
||||||
CreateBackdrop(b.icon)
|
CreateBackdrop(b.icon)
|
||||||
|
b.icon:EnableMouse(false)
|
||||||
b.icon.text = b.icon:CreateFontString(nil, "OVERLAY")
|
b.icon.text = b.icon:CreateFontString(nil, "OVERLAY")
|
||||||
b.icon.text:SetFontObject(GameFontWhite)
|
b.icon.text:SetFontObject(GameFontWhite)
|
||||||
b.icon.text:SetPoint("CENTER", -1, 0)
|
b.icon.text:SetPoint("CENTER", -1, 0)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<Include file="..\skins\blizzard\options-sound.lua"/>
|
<Include file="..\skins\blizzard\options-sound.lua"/>
|
||||||
<Include file="..\skins\blizzard\options-video.lua"/>
|
<Include file="..\skins\blizzard\options-video.lua"/>
|
||||||
<Include file="..\skins\blizzard\options-new.lua"/>
|
<Include file="..\skins\blizzard\options-new.lua"/>
|
||||||
|
<Include file="..\skins\blizzard\options-interface.lua"/>
|
||||||
<Include file="..\skins\blizzard\petition.lua"/>
|
<Include file="..\skins\blizzard\petition.lua"/>
|
||||||
<Include file="..\skins\blizzard\taxi.lua"/>
|
<Include file="..\skins\blizzard\taxi.lua"/>
|
||||||
<Include file="..\skins\blizzard\tooltips.lua"/>
|
<Include file="..\skins\blizzard\tooltips.lua"/>
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
pfUI:RegisterSkin("Options - Interface", function ()
|
||||||
|
local rawborder, border = GetBorderSize()
|
||||||
|
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||||
|
local cr, cg, cb = PFUI_CLASS_COLORS[UnitClassBase("player")]:GetRGB()
|
||||||
|
|
||||||
|
StripTextures(InterfaceOptionsFrame)
|
||||||
|
CreateBackdrop(InterfaceOptionsFrame, nil, nil, .75)
|
||||||
|
CreateBackdropShadow(InterfaceOptionsFrame)
|
||||||
|
|
||||||
|
local title = GetNoNameObject(InterfaceOptionsFrame, "FontString", "ARTWORK", ADDON_OPTIONS)
|
||||||
|
title:ClearAllPoints()
|
||||||
|
title:SetPoint("TOP", InterfaceOptionsFrame, "TOP", 0, -10)
|
||||||
|
|
||||||
|
CreateBackdrop(InterfaceOptionsFrameAddOns, nil, true, .75)
|
||||||
|
CreateBackdrop(InterfaceOptionsFramePanelContainer, nil, true, .75)
|
||||||
|
SkinScrollbar(InterfaceOptionsFrameAddOnsListScrollBar)
|
||||||
|
|
||||||
|
for _, button in ipairs(InterfaceOptionsFrameAddOns.buttons) do
|
||||||
|
button:GetHighlightTexture():SetTexture(cr, cg, cb, .25)
|
||||||
|
|
||||||
|
-- the list update swaps plus/minus textures on the toggle by path
|
||||||
|
local toggle = _G[button:GetName() .. "Toggle"]
|
||||||
|
SkinCollapseButton(toggle)
|
||||||
|
toggle:SetPushedTexture("")
|
||||||
|
toggle:SetHighlightTexture("")
|
||||||
|
toggle.SetPushedTexture = function() end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ClassicAPI's own pages (Options\Panel.lua) number their controls
|
||||||
|
local i = 1
|
||||||
|
while _G["ClassicAPIOptionsControl" .. i] do
|
||||||
|
local control = _G["ClassicAPIOptionsControl" .. i]
|
||||||
|
local ctype = control:GetFrameType()
|
||||||
|
if ctype == "CheckButton" then
|
||||||
|
SkinCheckbox(control)
|
||||||
|
elseif ctype == "Slider" then
|
||||||
|
SkinSlider(control)
|
||||||
|
else
|
||||||
|
SkinDropDown(control, nil, nil, nil, true)
|
||||||
|
end
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
SkinButton(InterfaceOptionsFrameDefaults)
|
||||||
|
SkinButton(InterfaceOptionsFrameCancel)
|
||||||
|
SkinButton(InterfaceOptionsFrameOkay)
|
||||||
|
InterfaceOptionsFrameOkay:ClearAllPoints()
|
||||||
|
InterfaceOptionsFrameOkay:SetPoint("RIGHT", InterfaceOptionsFrameCancel, "LEFT", -2*bpad, 0)
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user