From f730838e79485fcde6d1756d10ea88734396c8a2 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Fri, 20 Mar 2026 17:25:15 +0100 Subject: [PATCH] fixed hdgraphics module --- modules/hdgraphic.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/hdgraphic.lua b/modules/hdgraphic.lua index d999c9e9..9147513d 100644 --- a/modules/hdgraphic.lua +++ b/modules/hdgraphic.lua @@ -1,6 +1,12 @@ pfUI:RegisterModule("hdgraphic", "vanilla", function () - -- inject video settings to provide advanced slider values - _G.OptionsFrameSliders[3].maxValue = 15 + -- inject video settings to provide advanced slider values (deferred until frame is shown) + local origOptionsFrame_OnShow = OptionsFrame_OnShow + function OptionsFrame_OnShow() + if origOptionsFrame_OnShow then origOptionsFrame_OnShow() end + if _G.OptionsFrameSliders and _G.OptionsFrameSliders[3] then + _G.OptionsFrameSliders[3].maxValue = 15 + end + end local HookSetWorldDetail = SetWorldDetail function _G.SetWorldDetail(arg) HookSetWorldDetail((arg > 2 and 2 or arg)) @@ -37,4 +43,4 @@ pfUI:RegisterModule("hdgraphic", "vanilla", function () local frill = tonumber(GetCVar("frillDensity")) return frill > 48 and frill/16-1 or HookGetWorldDetail() end -end) +end) \ No newline at end of file