mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- fixed a bug that caused the /icehud slash command to not work when the addon was disabled (and therefore be unable to re-enable it). ouch!
This commit is contained in:
10
IceCore.lua
10
IceCore.lua
@ -92,7 +92,6 @@ function IceCore.prototype:Enable()
|
|||||||
self:DrawFrame()
|
self:DrawFrame()
|
||||||
|
|
||||||
for i = 1, table.getn(self.elements) do
|
for i = 1, table.getn(self.elements) do
|
||||||
self.elements[i]:SetDatabase(self.settings)
|
|
||||||
self.elements[i]:Create(self.IceHUDFrame)
|
self.elements[i]:Create(self.IceHUDFrame)
|
||||||
if (self.elements[i]:IsEnabled()) then
|
if (self.elements[i]:IsEnabled()) then
|
||||||
self.elements[i]:Enable(true)
|
self.elements[i]:Enable(true)
|
||||||
@ -104,11 +103,16 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function IceCore.prototype:ProfileChanged()
|
function IceCore.prototype:ProfileChanged()
|
||||||
|
self:SetModuleDatabases()
|
||||||
|
|
||||||
|
self:Redraw()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function IceCore.prototype:SetModuleDatabases()
|
||||||
for i = 1, table.getn(self.elements) do
|
for i = 1, table.getn(self.elements) do
|
||||||
self.elements[i]:SetDatabase(self.settings)
|
self.elements[i]:SetDatabase(self.settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:Redraw()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
21
IceHUD.lua
21
IceHUD.lua
@ -566,6 +566,17 @@ function IceHUD:OnInitialize()
|
|||||||
self:RegisterDefaults('account', self.IceCore.defaults)
|
self:RegisterDefaults('account', self.IceCore.defaults)
|
||||||
end
|
end
|
||||||
self:RegisterDefaults('profile', self.IceCore.defaults)
|
self:RegisterDefaults('profile', self.IceCore.defaults)
|
||||||
|
|
||||||
|
self.IceCore.settings = self.db.profile
|
||||||
|
self.IceCore:SetModuleDatabases()
|
||||||
|
self.options.args.modules.args = self.IceCore:GetModuleOptions()
|
||||||
|
self.options.args.colors.args = self.IceCore:GetColorOptions()
|
||||||
|
|
||||||
|
waterfall:Register("IceHUD", 'aceOptions', IceHUD.options)
|
||||||
|
|
||||||
|
-- Parnic - added /icehudcl to make rock config pick this up
|
||||||
|
self:RegisterChatCommand({"/icehudcl"}, IceHUD.options)
|
||||||
|
self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -581,21 +592,11 @@ function IceHUD:OnEnable(isFirst)
|
|||||||
self.db.account.settingsMoved = true
|
self.db.account.settingsMoved = true
|
||||||
end
|
end
|
||||||
|
|
||||||
self.IceCore.settings = self.db.profile
|
|
||||||
self.IceCore:Enable()
|
self.IceCore:Enable()
|
||||||
|
|
||||||
if isFirst then
|
if isFirst then
|
||||||
self:SetDebugging(self.IceCore:GetDebug())
|
self:SetDebugging(self.IceCore:GetDebug())
|
||||||
self.debugFrame = ChatFrame2
|
self.debugFrame = ChatFrame2
|
||||||
|
|
||||||
self.options.args.modules.args = self.IceCore:GetModuleOptions()
|
|
||||||
self.options.args.colors.args = self.IceCore:GetColorOptions()
|
|
||||||
|
|
||||||
waterfall:Register("IceHUD", 'aceOptions', IceHUD.options)
|
|
||||||
|
|
||||||
-- Parnic - added /icehudcl to make rock config pick this up
|
|
||||||
self:RegisterChatCommand({"/icehudcl"}, IceHUD.options)
|
|
||||||
self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user