Files
pfUI/modules/pixelperfect.lua
Brues 710be52f35 phase 3 removing tbc
Drop the now-vestigial expansion plumbing.

- Delete modules/thirdparty-tbc.lua + its xml Include
- Strip 10 tbc-tagged CreateConfig calls in modules/gui.lua
- Drop the expansion arg from CreateConfig() signature + the disabled-
  entry rendering path that depended on it
- Drop the showdisabled GUI toggle + its default
- Simplify pfUI:RegisterModule / pfUI:RegisterSkin to (name, func) only
- Strip the leading version arg ("vanilla:tbc", etc.) from all 114
  Register call sites
- Delete the pfUI.expansion variable
2026-05-25 18:50:53 -05:00

46 lines
1.0 KiB
Lua

pfUI:RegisterModule("pixelperfect", function ()
-- pre-calculated min values
local statics = {
[4] = 1.4222222222222,
[5] = 1.1377777777778,
[6] = 0.94814814814815,
[7] = 0.81269841269841,
[8] = 0.71111111111111,
}
-- pixel perfect
local function pixelperfect()
local conf = tonumber(C.global.pixelperfect)
if conf < 4 then
-- restore gamesettings
local scale = GetCVar("uiScale")
local use = GetCVar("useUiScale")
if use == 1 then
UIParent:SetScale(tonumber(use))
else
UIParent:SetScale(.9)
end
else
local scale = conf and statics[conf] or 1
SetCVar("uiScale", scale)
SetCVar("useUiScale", 1)
UIParent:SetScale(scale)
end
end
-- pixelperfect: native UIScale listener
if tonumber(C.global.pixelperfect) > 0 then
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", pixelperfect)
pixelperfect()
end
pfUI.pixelperfect = {
UpdateConfig = pixelperfect
}
end)