mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-09 23:20:00 +00:00
thirdparty: add option to show meters by default
This commit is contained in:
@@ -1199,6 +1199,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui.tabs.thirdparty.tabs.general = pfUI.gui.tabs.thirdparty.tabs:CreateTabChild(T["Thirdparty"], true)
|
||||
pfUI.gui.tabs.thirdparty.tabs.general:SetScript("OnShow", function()
|
||||
if not this.setup then
|
||||
CreateConfig(nil, this, T["Show Meters By Default"], C.thirdparty, "showmeter", "checkbox")
|
||||
CreateConfig(nil, this, T["Use Chat Colors for Meters"], C.thirdparty, "chatbg", "checkbox")
|
||||
CreateConfig(nil, this, T["DPSMate (Skin)"], C.thirdparty.dpsmate, "skin", "checkbox")
|
||||
CreateConfig(nil, this, T["DPSMate (Dock)"], C.thirdparty.dpsmate, "dock", "checkbox")
|
||||
|
||||
@@ -580,4 +580,17 @@ pfUI:RegisterModule("thirdparty", function ()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- toggle meter by default if configured
|
||||
if C.thirdparty.ktm.dock == "1" or C.thirdparty.dpsmate.dock == "1" or C.thirdparty.swstats.dock == "1" then
|
||||
if C.thirdparty.showmeter == "1" then
|
||||
local f = CreateFrame("Frame")
|
||||
f:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
f:SetScript("OnEvent", function()
|
||||
pfUI.thirdparty.meters.state = false
|
||||
pfUI.thirdparty.meters:Toggle()
|
||||
this:UnregisterAllEvents()
|
||||
end)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user