Garry's Mod Wiki

Panel:LerpPositions

  Panel:LerpPositions( number speed, boolean easeOut )

Description

Redefines the panel object's Panel:SetPos method to operate using frame-by-frame linear interpolation (Lerp). When the panel's position is changed, it will move to the target position at the speed defined. You can undo this with Panel:DisableLerp.

Unlike the other panel animation functions, such as Panel:MoveTo, this animation method will not operate whilst the game is paused. This is because it relies on FrameTime.

Arguments

1 number speed
The speed at which to move the panel. This is affected by the value of easeOut. Recommended values are:
  • 0.1 - 10 when easeOut is false.
  • 0.1 - 1 when easeOut is true.
2 boolean easeOut
This causes the panel object to 'jump' at the target, slowing as it approaches. This affects the speed value significantly, see above.