Files
pfUI/skins/blizzard/options-video.lua
T
Brues 967487e283 Utilizing ClassicAPI 1.6.0
commit d63057474083aa67fda2aa28ee6301334ffc4fdf
Author: Brues <5278969+brues-code@users.noreply.github.com>
Date:   Mon Jul 6 00:59:17 2026 -0500

    Use C_Map.GetMapOverlays instead of hardcoded pfMapOverlayData

    ClassicAPI's C_Map.GetMapOverlays reads WorldMapOverlay.dbc directly and
    returns the full overlay list for a zone (explored + unexplored) — the
    data vanilla's GetMapOverlayInfo withholds. mapreveal now iterates it
    straight (named fields: textureName/texturePath/width/height/offsets),
    dropping unpack_hash and the pfMapOverlayData tables entirely.

    Also fixes the explored-check: it compared the full texture path against
    GetMapOverlayInfo's bare-name keys, so the magnifying glass never
    suppressed on explored overlays. Now matches on the bare name.

    Removes ~870 lines of hand-measured overlay data (base + Turtle).

commit ad12c8209a80cd1211fe08e83f7013d24b5efd2d
Author: Brues <5278969+brues-code@users.noreply.github.com>
Date:   Sun Jul 5 23:45:09 2026 -0500

    utilize HookScript from ClassicAPI
2026-07-09 00:56:06 -05:00

89 lines
3.0 KiB
Lua

pfUI:RegisterSkin("Options - Video", function ()
-- on new PTR, OptionsFrameCategoryList exists meaning new combined panel is used
if OptionsFrameCategoryList then return end
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
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
pfUI.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)
end
end
CreateBackdrop(OptionsFrame, nil, nil, .75)
CreateBackdropShadow(OptionsFrame)
EnableMovable(OptionsFrame)
OptionsFrame:HookScript("OnShow", function()
this:ClearAllPoints()
this:SetPoint("CENTER", 0, 0)
end)
OptionsFrameHeader:SetTexture("")
local OptionsFrameHeaderText = GetNoNameObject(OptionsFrame, "FontString", "ARTWORK", VIDEOOPTIONS_MENU)
OptionsFrameHeaderText:ClearAllPoints()
OptionsFrameHeaderText:SetPoint("TOP", OptionsFrame.backdrop, "TOP", 0, -10)
CreateBackdrop(OptionsFrameDisplay, nil, true, .75)
CreateBackdrop(OptionsFrameWorldAppearance, nil, true, .75)
CreateBackdrop(OptionsFrameBrightness, nil, true, .75)
CreateBackdrop(OptionsFramePixelShaders, nil, true, .75)
CreateBackdrop(OptionsFrameMiscellaneous, nil, true, .75)
SkinButton(OptionsFrameDefaults)
SkinButton(OptionsFrameCancel)
SkinButton(OptionsFrameOkay)
OptionsFrameOkay:ClearAllPoints()
OptionsFrameOkay:SetPoint("RIGHT", OptionsFrameCancel, "LEFT", -2*bpad, 0)
SkinDropDown(OptionsFrameResolutionDropDown)
SkinDropDown(OptionsFrameRefreshDropDown)
SkinDropDown(OptionsFrameMultiSampleDropDown)
for i=1, MAX_SLIDERS do
SkinSlider(_G["OptionsFrameSlider"..i])
end
for i=1, MAX_CHECKBOXES do
local btn = _G["OptionsFrameCheckButton"..i]
if btn then
SkinCheckbox(btn, 28)
end
end
end)