mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- fix a rare case of accessing nil variables when bars are switching quickly
This commit is contained in:
@ -438,10 +438,17 @@ function IceBarElement.prototype:CreateTexts()
|
|||||||
self.frame.bottomUpperText:ClearAllPoints()
|
self.frame.bottomUpperText:ClearAllPoints()
|
||||||
self.frame.bottomLowerText:ClearAllPoints()
|
self.frame.bottomLowerText:ClearAllPoints()
|
||||||
|
|
||||||
offx = offx + self.moduleSettings.textHorizontalOffset
|
if self.moduleSettings.textHorizontalOffset ~= nil then
|
||||||
|
offx = offx + self.moduleSettings.textHorizontalOffset
|
||||||
|
end
|
||||||
|
|
||||||
self.frame.bottomUpperText:SetPoint("TOP"..ownPoint , self.frame, "BOTTOM"..parentPoint, offx, self.moduleSettings.textVerticalOffset)
|
local offy = 0
|
||||||
self.frame.bottomLowerText:SetPoint("TOP"..ownPoint , self.frame, "BOTTOM"..parentPoint, offx, self.moduleSettings.textVerticalOffset - 14)
|
if self.moduleSettings.textVerticalOffset ~= nil then
|
||||||
|
offy = self.moduleSettings.textVerticalOffset
|
||||||
|
end
|
||||||
|
|
||||||
|
self.frame.bottomUpperText:SetPoint("TOP"..ownPoint , self.frame, "BOTTOM"..parentPoint, offx, offy)
|
||||||
|
self.frame.bottomLowerText:SetPoint("TOP"..ownPoint , self.frame, "BOTTOM"..parentPoint, offx, offy - 14)
|
||||||
|
|
||||||
if (self.moduleSettings.textVisible["upper"]) then
|
if (self.moduleSettings.textVisible["upper"]) then
|
||||||
self.frame.bottomUpperText:Show()
|
self.frame.bottomUpperText:Show()
|
||||||
|
Reference in New Issue
Block a user