Panel:MoveTo

Hello, i’d like to move a derma’s position in an animation and im hoping i can do so with Panel:MoveTo.
ive looked through it and tried to use it but i dont understand how it all works.
so i would appreciate it if you guys could explain how to use it

code i want to move


local dsadasasddasdasdas = vgui.Create( "DFrame" )
dsadasasddasdasdas:SetTitle( "asdasdasdasdasdasdas" )
dsadasasddasdasdas:SetPos(0,100)
dsadasasddasdasdas:SetSize( 1920, 900 )
dsadasasddasdasdas:ShowCloseButton(true)
dsadasasddasdasdas.Paint = function( self, w, h )
	draw.RoundedBox( 0, 0, 0, w, h, Color( 41, 128, 185, 250 ) ) 

end



There used to be a good example on that page but now it’s gone-I wish I could help :frowning:

Take a look at some easings here, I’m pretty sure they can be used with Panel:MoveTo if you use them in the callback function… wish I could actually help but I don’t know where the example went



local newposX = 500 -- X coordinate of the panel at the end of the animation
local newposY = 500 -- Y coordinate of the panel at the end of the animation
local time = 3 -- How long does the animation take?
local delay = 0 -- The animation will start after that delay in seconds. In other words, 0 is instant

dsadasasddasdasdas:MoveTo(newposX, newposY, time, delay)


thanks man helped out alot