Skip to content

Commit

Permalink
ixAttributeBar animate speed param
Browse files Browse the repository at this point in the history
sometimes it's too slow or fast for our needs, just set pnl.animateSpeed to something higher or lower
  • Loading branch information
mage-tearz authored Jan 16, 2025
1 parent be57ae9 commit 1aaccfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gamemode/core/derma/cl_attribute.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function PANEL:Init()
self.value = 0
self.deltaValue = self.value
self.max = 10
self.animateSpeed = 15

self.bar = self:Add("DPanel")
self.bar:Dock(FILL)
Expand Down Expand Up @@ -134,7 +135,7 @@ function PANEL:Think()
end
end

self.deltaValue = math.Approach(self.deltaValue, self.value, FrameTime() * 15)
self.deltaValue = math.Approach(self.deltaValue, self.value, FrameTime() * self.animateSpeed)
end

function PANEL:DoChange()
Expand Down

0 comments on commit 1aaccfc

Please sign in to comment.