mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-18 18:40:49 +00:00
gui: option to hide incompatible config entries
This commit is contained in:
@@ -50,7 +50,9 @@ function pfUI:LoadConfig()
|
|||||||
pfUI:UpdateConfig("global", nil, "servertime", "0")
|
pfUI:UpdateConfig("global", nil, "servertime", "0")
|
||||||
pfUI:UpdateConfig("global", nil, "autosell", "0")
|
pfUI:UpdateConfig("global", nil, "autosell", "0")
|
||||||
pfUI:UpdateConfig("global", nil, "autorepair", "0")
|
pfUI:UpdateConfig("global", nil, "autorepair", "0")
|
||||||
|
|
||||||
pfUI:UpdateConfig("gui", nil, "reloadmarker", "0")
|
pfUI:UpdateConfig("gui", nil, "reloadmarker", "0")
|
||||||
|
pfUI:UpdateConfig("gui", nil, "showdisabled", "0")
|
||||||
|
|
||||||
pfUI:UpdateConfig("buffs", nil, "buffs", "1")
|
pfUI:UpdateConfig("buffs", nil, "buffs", "1")
|
||||||
pfUI:UpdateConfig("buffs", nil, "debuffs", "1")
|
pfUI:UpdateConfig("buffs", nil, "debuffs", "1")
|
||||||
|
|||||||
+14
-1
@@ -51,7 +51,10 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function CreateConfig(ufunc, caption, category, config, widget, values, skip, named, type)
|
function CreateConfig(ufunc, caption, category, config, widget, values, skip, named, type, expansion)
|
||||||
|
local disabled = expansion and not strfind(expansion, pfUI.expansion)
|
||||||
|
if disabled and pfUI_config.gui.showdisabled == "0" then return end
|
||||||
|
|
||||||
-- this object placement
|
-- this object placement
|
||||||
if this.objectCount == nil then
|
if this.objectCount == nil then
|
||||||
this.objectCount = 0
|
this.objectCount = 0
|
||||||
@@ -118,6 +121,15 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
|||||||
frame.caption:SetText(caption)
|
frame.caption:SetText(caption)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if disabled then
|
||||||
|
if frame.caption then
|
||||||
|
frame.caption:SetText(caption .. " |cffff5555[" .. T["Only"] .. " " .. string.gsub(expansion, ":", "&") .. "]")
|
||||||
|
end
|
||||||
|
|
||||||
|
frame:SetAlpha(.5)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if category == "CVAR" then
|
if category == "CVAR" then
|
||||||
category = {}
|
category = {}
|
||||||
category[config] = tostring(GetCVar(config))
|
category[config] = tostring(GetCVar(config))
|
||||||
@@ -1349,6 +1361,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
|||||||
CreateConfig(nil, T["Enable Single Line UIErrors"], C.global, "errors_limit", "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["Disable All UIErrors"], C.global, "errors_hide", "checkbox")
|
||||||
CreateConfig(nil, T["Highlight Settings That Require Reload"], C.gui, "reloadmarker", "checkbox")
|
CreateConfig(nil, T["Highlight Settings That Require Reload"], C.gui, "reloadmarker", "checkbox")
|
||||||
|
CreateConfig(nil, T["Show Incompatible Config Entries"], C.gui, "showdisabled", "checkbox")
|
||||||
|
|
||||||
-- Delete / Reset
|
-- Delete / Reset
|
||||||
CreateConfig(nil, T["Delete / Reset"], nil, nil, "header")
|
CreateConfig(nil, T["Delete / Reset"], nil, nil, "header")
|
||||||
|
|||||||
Reference in New Issue
Block a user