Tweaks to the state and visibility configuration

This commit is contained in:
Hendrik Leppkes
2008-11-01 17:08:08 +01:00
parent 29f204b662
commit 170a11c975
3 changed files with 35 additions and 16 deletions
+7 -1
View File
@@ -8,7 +8,7 @@ local Bar = Bartender4.Bar.prototype
local barregistry = Bartender4.Bar.barregistry
-- option utilty functions
local optGetter, optSetter, visibilityGetter, visibilitySetter, customEnabled
local optGetter, optSetter, visibilityGetter, visibilitySetter, customEnabled, customDisabled, customCopy
do
local getBar, optionMap, callFunc
-- maps option keys to function names
@@ -65,6 +65,11 @@ do
return bar:GetVisibilityOption("custom")
end
function customDisabled(info)
local bar = getBar(info[2])
return not bar:GetVisibilityOption("custom")
end
function customCopy(info)
local bar = getBar(info[2])
bar:CopyCustomConditionals()
@@ -250,6 +255,7 @@ function Bar:GetOptionObject()
desc = L["You can use any macro conditionals in the custom string, using \"show\" and \"hide\" as values.\n\nExample: [combat]hide;show"],
width = "full",
multiline = true,
disabled = customDisabled,
},
},
},