Garry's Mod Wiki

Panel:DisableLerp

Panel:DisableLerp()

Description

Resets the panel object's Panel:SetPos method and removes its animation table (Panel.LerpAnim). This effectively undoes the changes made by Panel:LerpPositions.

In order to use Lerp animation again, you must call Panel:Stop before setting its SetPosReal property to 'nil'. See the example below.

Example

Creates a function for changing the Lerp animation speed of a panel.

function ChangeLerpSpeed( pnl, newSpeed, ease ) if !ispanel(pnl) or !IsValid(pnl) then return end -- Make sure panel is valid pnl:DisableLerp() pnl:Stop() pnl.SetPosReal = nil pnl:LerpPositions( newSpeed, ease ) end

Page Links


Special Pages


Wikis

?

Render Time: 73ms

DB GetPage 44
Generate Html 2
SaveChanges (1) 11
Render Body 0
Render Sidebar 13