mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- made sure that the new custom text colors get set before using them
This commit is contained in:
@ -51,14 +51,18 @@ function IceCustomBar.prototype:Enable(core)
|
||||
self.moduleSettings.auraIconYOffset = 0
|
||||
end
|
||||
|
||||
self:FixupTextColors()
|
||||
self:SetCustomTextColor(self.frame.bottomUpperText, self.moduleSettings.upperTextColor)
|
||||
self:SetCustomTextColor(self.frame.bottomLowerText, self.moduleSettings.lowerTextColor)
|
||||
end
|
||||
|
||||
function IceCustomBar.prototype:FixupTextColors()
|
||||
if not self.moduleSettings.upperTextColor then
|
||||
self.moduleSettings.upperTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
self:SetCustomTextColor(self.frame.bottomUpperText, self.moduleSettings.upperTextColor)
|
||||
if not self.moduleSettings.lowerTextColor then
|
||||
self.moduleSettings.lowerTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
self:SetCustomTextColor(self.frame.bottomLowerText, self.moduleSettings.lowerTextColor)
|
||||
end
|
||||
|
||||
function IceCustomBar.prototype:ConditionalSubscribe()
|
||||
@ -495,6 +499,7 @@ function IceCustomBar.prototype:GetOptions()
|
||||
type = "color",
|
||||
name = L["Upper Text Color"],
|
||||
get = function()
|
||||
self:FixupTextColors()
|
||||
return self.moduleSettings.upperTextColor.r, self.moduleSettings.upperTextColor.g, self.moduleSettings.upperTextColor.b, 1
|
||||
end,
|
||||
set = function(info, r,g,b)
|
||||
|
@ -57,16 +57,19 @@ function IceCustomCDBar.prototype:Enable(core)
|
||||
self.moduleSettings.displayWhenEmpty = nil
|
||||
end
|
||||
|
||||
if not self.moduleSettings.upperTextColor then
|
||||
self.moduleSettings.upperTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
self:FixupTextColors()
|
||||
self:SetCustomTextColor(self.frame.bottomUpperText, self.moduleSettings.upperTextColor)
|
||||
if not self.moduleSettings.lowerTextColor then
|
||||
self.moduleSettings.lowerTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
self:SetCustomTextColor(self.frame.bottomLowerText, self.moduleSettings.lowerTextColor)
|
||||
end
|
||||
|
||||
function IceCustomCDBar.prototype:FixupTextColors()
|
||||
if not self.moduleSettings.upperTextColor then
|
||||
self.moduleSettings.upperTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
if not self.moduleSettings.lowerTextColor then
|
||||
self.moduleSettings.lowerTextColor = {r=1, g=1, b=1}
|
||||
end
|
||||
end
|
||||
|
||||
function IceCustomCDBar.prototype:Disable(core)
|
||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||
@ -392,6 +395,7 @@ function IceCustomCDBar.prototype:GetOptions()
|
||||
type = "color",
|
||||
name = L["Upper Text Color"],
|
||||
get = function()
|
||||
self:FixupTextColors()
|
||||
return self.moduleSettings.upperTextColor.r, self.moduleSettings.upperTextColor.g, self.moduleSettings.upperTextColor.b, 1
|
||||
end,
|
||||
set = function(info, r,g,b)
|
||||
|
Reference in New Issue
Block a user