mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- respect the user's mod-wide "enabled" setting when changing profiles (ticket #117)
- also cleaned up some logic that could cause errors when enabling the mod due to a profile switch when the player initially loaded with it disabled
This commit is contained in:
@ -781,6 +781,10 @@ function IceCore.prototype:IsInConfigMode()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceCore.prototype:ConfigModeToggle(bWantConfig)
|
function IceCore.prototype:ConfigModeToggle(bWantConfig)
|
||||||
|
if self.bConfigMode == bWantConfig then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
self.bConfigMode = bWantConfig
|
self.bConfigMode = bWantConfig
|
||||||
|
|
||||||
if bWantConfig then
|
if bWantConfig then
|
||||||
|
@ -410,7 +410,7 @@ function IceElement.prototype:IsVisible()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceElement.prototype:Show(bShouldShow)
|
function IceElement.prototype:Show(bShouldShow)
|
||||||
if self.bIsVisible == bShouldShow then
|
if self.bIsVisible == bShouldShow or not self.masterFrame or not self.frame then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
14
IceHUD.lua
14
IceHUD.lua
@ -245,12 +245,12 @@ function IceHUD:OnEnable(isFirst)
|
|||||||
|
|
||||||
if self.db.profile.enable then
|
if self.db.profile.enable then
|
||||||
self.IceCore:Enable()
|
self.IceCore:Enable()
|
||||||
|
end
|
||||||
|
|
||||||
-- Add dual-spec support
|
-- Add dual-spec support
|
||||||
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
|
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
|
||||||
if LibDualSpec then
|
if LibDualSpec then
|
||||||
LibDualSpec:EnhanceDatabase(self.db, "IceHUD")
|
LibDualSpec:EnhanceDatabase(self.db, "IceHUD")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--@debug@
|
--@debug@
|
||||||
@ -443,7 +443,9 @@ end
|
|||||||
|
|
||||||
function IceHUD:PostProfileChanged(db, newProfile)
|
function IceHUD:PostProfileChanged(db, newProfile)
|
||||||
self:NotifyNewDb()
|
self:NotifyNewDb()
|
||||||
self.IceCore:Enable()
|
if self.db.profile.enable then
|
||||||
|
self.IceCore:Enable()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceHUD:ProfileReset()
|
function IceHUD:ProfileReset()
|
||||||
|
@ -347,6 +347,9 @@ This isn't |cff9999ffIceHUD|r - it's Blizzard's new Spell Alerts they added in 4
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
IceHUD.IceCore:SetFontFamily(value)
|
IceHUD.IceCore:SetFontFamily(value)
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not IceHUD.IceCore:IsEnabled()
|
||||||
|
end,
|
||||||
values = AceGUIWidgetLSMlists.font,
|
values = AceGUIWidgetLSMlists.font,
|
||||||
order = 94.75,
|
order = 94.75,
|
||||||
},
|
},
|
||||||
@ -572,6 +575,9 @@ This isn't |cff9999ffIceHUD|r - it's Blizzard's new Spell Alerts they added in 4
|
|||||||
func = function()
|
func = function()
|
||||||
IceHUD:CreateCustomModuleAndNotify(lastCustomModule)
|
IceHUD:CreateCustomModuleAndNotify(lastCustomModule)
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not IceHUD.IceCore:IsEnabled()
|
||||||
|
end,
|
||||||
order = 94.6,
|
order = 94.6,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -585,6 +591,9 @@ This isn't |cff9999ffIceHUD|r - it's Blizzard's new Spell Alerts they added in 4
|
|||||||
set = function(info, value)
|
set = function(info, value)
|
||||||
IceHUD.IceCore:ConfigModeToggle(value)
|
IceHUD.IceCore:ConfigModeToggle(value)
|
||||||
end,
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not IceHUD.IceCore:IsEnabled()
|
||||||
|
end,
|
||||||
order = 95
|
order = 95
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user