- add Enable/Disable to the Pet and Stance Bar

- unlocking works right on the petbar now
This commit is contained in:
Hendrik Leppkes
2008-03-05 14:17:12 +00:00
parent 23f723b892
commit 45f86eff26
4 changed files with 127 additions and 43 deletions
+12 -9
View File
@@ -32,20 +32,12 @@ end
function Bartender4:UpdateModuleConfigs()
self:Lock()
for k,v in AceAddon:IterateModulesOfAddon(self) do
if type(v.ApplyConfig) == "function" then
if v:IsEnabled() and type(v.ApplyConfig) == "function" then
v:ApplyConfig()
end
end
end
function Bartender4:Update()
for k,v in AceAddon:IterateModulesOfAddon("Bartender4") do
if type(v.Update) == "function" then
v:Update()
end
end
end
function Bartender4:CombatLockdown()
self:Lock()
LibStub("AceConfigDialog-3.0"):Close("Bartender4")
@@ -84,3 +76,14 @@ function Bartender4:Merge(target, source)
end
return target
end
Bartender4.modulePrototype = {}
function Bartender4.modulePrototype:ToggleModule(info, value)
self.db.profile.enabled = value
if value and not self:IsEnabled() then
self:Enable()
elseif not value and self:IsEnabled() then
self:Disable()
end
end
Bartender4:SetDefaultModulePrototype(Bartender4.modulePrototype)