Fix: apply saved window settings after the game loads them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc
This commit is contained in:
Claude
2026-10-12 15:39:11 -04:00
parent 06ae0d50b9
commit 20d4608c21
2 changed files with 18 additions and 0 deletions
+15
View File
@@ -1759,6 +1759,21 @@ local OB_OK, OB_ERR = pcall(function ()
end
end
-- This file runs before the game loads the saved settings, so everything set up above
-- used the defaults. Once they are loaded, apply them: size, look, lock, icon and
-- window position.
do
local f = CreateFrame("Frame")
f:RegisterEvent("VARIABLES_LOADED")
f:SetScript("OnEvent", function()
panel:SetScale(CFG.scale or 1)
ApplyLook()
if CFG.locked then grip:Hide() else grip:Show() end
PlaceButton()
PlacePanel()
end)
end
-- for the settings window (OctoBusOptions.lua)
OctoBus = {
cfg = CFG,