mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- fixed bars disappearing when they were set to reverse and they filled up
- also fixed an issue where deleting a custom cooldown bar while it was set to "always" display would cause it to get stuck on the screen until the next UI reload
This commit is contained in:
@ -793,11 +793,11 @@ function IceBarElement.prototype:Flip(side)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceBarElement.prototype:SetScale(scale, force)
|
function IceBarElement.prototype:SetScale(inScale, force)
|
||||||
local oldScale = self.CurrScale
|
local oldScale = self.CurrScale
|
||||||
local min_y, max_y;
|
local min_y, max_y;
|
||||||
|
|
||||||
self.CurrScale = IceHUD:Clamp(self:LerpScale(scale), 0, 1)
|
self.CurrScale = IceHUD:Clamp(self:LerpScale(inScale), 0, 1)
|
||||||
|
|
||||||
if force or oldScale ~= self.CurrScale then
|
if force or oldScale ~= self.CurrScale then
|
||||||
local scale = self.CurrScale
|
local scale = self.CurrScale
|
||||||
@ -819,7 +819,7 @@ function IceBarElement.prototype:SetScale(scale, force)
|
|||||||
|
|
||||||
self.barFrame:SetHeight(self.settings.barHeight * scale)
|
self.barFrame:SetHeight(self.settings.barHeight * scale)
|
||||||
|
|
||||||
if self.CurrScale == 0 then
|
if scale == 0 then
|
||||||
self.barFrame.bar:Hide()
|
self.barFrame.bar:Hide()
|
||||||
else
|
else
|
||||||
self.barFrame.bar:Show()
|
self.barFrame.bar:Show()
|
||||||
|
@ -508,6 +508,7 @@ function IceCustomCDBar.prototype:IsReady()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomCDBar.prototype:Show(bShouldShow)
|
function IceCustomCDBar.prototype:Show(bShouldShow)
|
||||||
|
if self.moduleSettings.enabled then
|
||||||
if (self.moduleSettings.displayMode == "Always") then
|
if (self.moduleSettings.displayMode == "Always") then
|
||||||
if not self.bIsVisible then
|
if not self.bIsVisible then
|
||||||
IceCustomCDBar.super.prototype.Show(self, true)
|
IceCustomCDBar.super.prototype.Show(self, true)
|
||||||
@ -521,6 +522,9 @@ function IceCustomCDBar.prototype:Show(bShouldShow)
|
|||||||
else
|
else
|
||||||
IceCustomCDBar.super.prototype.Show(self, bShouldShow)
|
IceCustomCDBar.super.prototype.Show(self, bShouldShow)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
IceCustomCDBar.super.prototype.Show(self, bShouldShow)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomCDBar.prototype:UseTargetAlpha(scale)
|
function IceCustomCDBar.prototype:UseTargetAlpha(scale)
|
||||||
|
Reference in New Issue
Block a user