- add Enable/Disable to the Pet and Stance Bar
- unlocking works right on the petbar now
This commit is contained in:
+12
-9
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user