- added bar/bg visibility options to mirrorbar, castbar, targetcastbar

- shuffled bar/bg visibility options to show up after the Enabled option and to be disabled if the bar is disabled
- removed OnUpdate registration for mirrorbar since it handles OnUpdate itself
- fixed a potential nil access in the DogTag fontstring stuff
This commit is contained in:
Parnic
2008-02-10 20:52:00 +00:00
parent 30117d1cfd
commit 81b8bfd219
4 changed files with 139 additions and 6 deletions

View File

@ -81,6 +81,48 @@ function TargetCast.prototype:GetOptions()
end
}
opts["barVisible"] = {
type = 'toggle',
name = 'Bar visible',
desc = 'Toggle bar visibility',
get = function()
return self.moduleSettings.barVisible['bar']
end,
set = function(v)
self.moduleSettings.barVisible['bar'] = v
if v then
self.barFrame:Show()
else
self.barFrame:Hide()
end
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 28
}
opts["bgVisible"] = {
type = 'toggle',
name = 'Bar background visible',
desc = 'Toggle bar background visibility',
get = function()
return self.moduleSettings.barVisible['bg']
end,
set = function(v)
self.moduleSettings.barVisible['bg'] = v
if v then
self.frame.bg:Show()
else
self.frame.bg:Hide()
end
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 29
}
return opts
end