Panel.SizeTo

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:SizeTo( Number width, Number height, Number time, Number startdelay, Number ease )
Description:
Animate a panel to a certain height/width for a certain time
Returns: nil
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SizeTo]Panel.SizeTo [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionMake a panel 200x200, over a set time of 5 seconds, immediately starting, and easing in gradually.
Used onNewerClient.png
Code
local frame = vgui.Create("DFrame")
frame:SetSize(600,600)
frame:Center()
frame:MakePopup()
frame:SizeTo( 200, 200, 5, 0, 4)
OutputFrame will shrink to 200x200 starting slow, gradually moving faster.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox