mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 13:30:50 +00:00
performance update
performance update
This commit is contained in:
@@ -1,45 +1,19 @@
|
||||
pfUI:RegisterSkin("Options - Video", "vanilla:tbc", function ()
|
||||
pfUI:RegisterSkin("Options - Video", "vanilla", function ()
|
||||
local rawborder, border = GetBorderSize()
|
||||
local bpad = rawborder > 1 and border - GetPerfectPixel() or GetPerfectPixel()
|
||||
|
||||
-- Compatibility
|
||||
local MAX_SLIDERS, MAX_CHECKBOXES
|
||||
if OptionsFrameSlider10 then -- tbc
|
||||
MAX_SLIDERS = 11
|
||||
MAX_CHECKBOXES = 19
|
||||
local MAX_SLIDERS = 9
|
||||
local MAX_CHECKBOXES = 18
|
||||
|
||||
for i=1, MAX_SLIDERS do
|
||||
local slider = _G["OptionsFrameSlider"..i]
|
||||
local shift = 0
|
||||
if i == 4 or i == 5 or i == 7 or i == 8 or i == 10 or i == 11 then shift = 10 end
|
||||
local point, anchor, anchorPoint, x, y = slider:GetPoint()
|
||||
slider:ClearAllPoints()
|
||||
slider:SetPoint(point, anchor, anchorPoint, x, y - shift)
|
||||
end
|
||||
|
||||
hooksecurefunc("OptionsFrame_Load", function()
|
||||
OptionsFramePixelShaders:SetWidth(230)
|
||||
OptionsFrameMiscellaneous:ClearAllPoints()
|
||||
OptionsFrameMiscellaneous:SetPoint("LEFT", OptionsFramePixelShaders, "RIGHT", 6, 0)
|
||||
end)
|
||||
OptionsFrameDefaults:ClearAllPoints()
|
||||
OptionsFrameDefaults:SetPoint("TOPLEFT", OptionsFramePixelShaders, "BOTTOMLEFT", 0, -10)
|
||||
OptionsFrameCancel:ClearAllPoints()
|
||||
OptionsFrameCancel:SetPoint("TOPRIGHT", OptionsFrameMiscellaneous, "BOTTOMRIGHT", 0, -10)
|
||||
else -- vanilla
|
||||
MAX_SLIDERS = 9
|
||||
MAX_CHECKBOXES = 18
|
||||
|
||||
for i=1, MAX_SLIDERS do
|
||||
local slider = _G["OptionsFrameSlider"..i]
|
||||
local shift = 0
|
||||
if i == 1 or i == 6 then shift = 4
|
||||
elseif i == 4 or i == 8 then shift = 10
|
||||
end
|
||||
local point, anchor, anchorPoint, x, y = slider:GetPoint()
|
||||
slider:ClearAllPoints()
|
||||
slider:SetPoint(point, anchor, anchorPoint, x, y - shift)
|
||||
for i=1, MAX_SLIDERS do
|
||||
local slider = _G["OptionsFrameSlider"..i]
|
||||
local shift = 0
|
||||
if i == 1 or i == 6 then shift = 4
|
||||
elseif i == 4 or i == 8 then shift = 10
|
||||
end
|
||||
local point, anchor, anchorPoint, x, y = slider:GetPoint()
|
||||
slider:ClearAllPoints()
|
||||
slider:SetPoint(point, anchor, anchorPoint, x, y - shift)
|
||||
end
|
||||
|
||||
CreateBackdrop(OptionsFrame, nil, nil, .75)
|
||||
|
||||
Reference in New Issue
Block a user