Lagbar bg always hidden when logged in
chengyi-wu opened this issue ยท 1 comments
Maybe need to toggle bg during login.
function configEvent:PLAYER_LOGIN()
addon.aboutPanel = LoadAboutFrame()
--bg shown
local btnBG = createCheckbutton(addon.aboutPanel, L.SlashBGInfo)
btnBG:SetScript("OnShow", function() btnBG:SetChecked(LagBar_DB.bgShown) end)
btnBG.func = function(slashSwitch)
local value = LagBar_DB.bgShown
if not slashSwitch then value = btnBG:GetChecked() end
if value then
LagBar_DB.bgShown = false
DEFAULT_CHAT_FRAME:AddMessage(L.SlashBGOff)
else
LagBar_DB.bgShown = true
DEFAULT_CHAT_FRAME:AddMessage(L.SlashBGOn)
end
addon:BackgroundToggle()
end
btnBG:SetScript("OnClick", btnBG.func)
addConfigEntry(btnBG, 0, -20)
addon.aboutPanel.btnBG = btnBG
--set bg
addon:BackgroundToggle()