here is an example (untested):
local step = 0.05 -- Progress speed per frame (from 0 to 1.0)
local x,y = guiGetScreenSize() -- get screen size
local sx,sy = 400,300 -- predefining the size
local px,py = x/2-sx/2,y -- middle of the screen by X, right behind the visible Y part. x/2-sx/2 stands for the middle of the screen. y means "after" the bottom screen edge
local progress = 0
function renderWindow()
progress = progress + step -- Increasing the progress each frame
if progress > 1 then -- Progress can't be more than 1 so let's limit it
progress = 1
end
py = interpolateBetween(y,0,0,y/2-sy/2,0,0,progress,"OutBounce") -- Look for "easing" in wiki to change the animation type
dxDrawRectangle(px,py,sx,sy,tocolor(0,0,0,170)) -- Rectangle as an example
end
addEventHandler("onClientRender",getRootElement(),renderWindow)