mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
core: add option to disable addon errors
This commit is contained in:
@@ -43,6 +43,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("global", nil, "font_combat", "Interface\\AddOns\\pfUI\\fonts\\Continuum.ttf")
|
||||
|
||||
pfUI:UpdateConfig("global", nil, "force_region", "1")
|
||||
pfUI:UpdateConfig("global", nil, "errors", "1")
|
||||
pfUI:UpdateConfig("global", nil, "errors_limit", "1")
|
||||
pfUI:UpdateConfig("global", nil, "errors_hide", "0")
|
||||
pfUI:UpdateConfig("global", nil, "hidebuff", "0")
|
||||
|
||||
@@ -1404,6 +1404,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(nil, T["Scrolling Combat Text Font"], C.global, "font_combat", "dropdown", pfUI.gui.dropdowns.fonts)
|
||||
CreateConfig(U["pixelperfect"], T["Enable UI-Scale"], C.global, "pixelperfect", "dropdown", pfUI.gui.dropdowns.scaling)
|
||||
CreateConfig(nil, T["Enable Offscreen Frame Positions"], C.global, "offscreen", "checkbox")
|
||||
CreateConfig(nil, T["Display Addon Errors In Chat"], C.global, "errors", "checkbox")
|
||||
CreateConfig(nil, T["Enable Single Line UIErrors"], C.global, "errors_limit", "checkbox")
|
||||
CreateConfig(nil, T["Disable All UIErrors"], C.global, "errors_hide", "checkbox")
|
||||
CreateConfig(nil, T["Highlight Settings That Require Reload"], C.gui, "reloadmarker", "checkbox")
|
||||
|
||||
@@ -330,7 +330,11 @@ print = message
|
||||
|
||||
error = function(msg)
|
||||
if PF_DEBUG_MODE then message(debugstack()) end
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
|
||||
if string.find(msg, "AddOns\\pfUI") then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
|
||||
elseif not pfUI_config or (pfUI_config.global and pfUI_config.global.errors == "1") then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffcc3333ERROR: |cffff5555".. (msg or "nil" ))
|
||||
end
|
||||
end
|
||||
seterrorhandler(error)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user