mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- better fix for cast bars getting stuck sometimes
- reinstated the code that was shutting off updates when a bar reached its desired scale
This commit is contained in:
@ -1186,9 +1186,7 @@ function IceBarElement.prototype:SetScale(inScale, force)
|
|||||||
self:ConditionalSetupUpdate()
|
self:ConditionalSetupUpdate()
|
||||||
else
|
else
|
||||||
if self.CurrScale == self.DesiredScale then
|
if self.CurrScale == self.DesiredScale then
|
||||||
-- Parnic: this optimization may be reaching a bit too far and causing things to get stuck
|
IceHUD.IceCore:RequestUpdates(self, nil)
|
||||||
-- without this, several modules continues to update that don't need to but the stuck issues seem to be decreased
|
|
||||||
--IceHUD.IceCore:RequestUpdates(self, nil)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1558,13 +1556,3 @@ function IceBarElement.prototype:LoadMarkers()
|
|||||||
self:CreateMarker(i)
|
self:CreateMarker(i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceBarElement.prototype:Show(bShouldShow)
|
|
||||||
if IceBarElement.super.prototype.Show(self, bShouldShow) then
|
|
||||||
if self.bIsVisible then
|
|
||||||
self:ConditionalSetupUpdate()
|
|
||||||
else
|
|
||||||
IceHUD.IceCore:RequestUpdates(self, nil)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
@ -211,6 +211,15 @@ function IceCastBar.prototype:GetOptions()
|
|||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceCastBar.prototype:IsFull(scale)
|
||||||
|
local retval = IceCastBar.super.prototype.IsFull(self, scale)
|
||||||
|
if retval then
|
||||||
|
if self.action and self.action ~= IceCastBar.Actions.None then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return retval
|
||||||
|
end
|
||||||
|
|
||||||
-- 'Protected' methods --------------------------------------------------------
|
-- 'Protected' methods --------------------------------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user