--Slide Animation local sx, sy = guiGetScreenSize( ) local window = guiCreateWindow((sx-300)/2, (sy-400)/2, 300, 400, "Test", false) guiSetVisible(window, false) bindKey("f2", "down", function( ) if anim then return end local v = guiGetVisible(window) if not v then guiSetVisible(window, true) animate(0, 1, 1, 1000, function(alpha) guiSetAlpha(window,alpha) end) end anim = true animate(v and 400 or 0, v and 0 or 400, 2, 1250, function(height) if v and height == 0 then guiSetVisible(window, false) anim = false elseif not v and height == 400 then anim = false end local w, h = guiGetSize(window, false) guiSetSize(window, w, height, false) end) end)
local pos = { bg = {x = sw(0), y = sh(0), w = sw(1920), h = sw(1080) }, panel = {x = sw(405), y = sh(230), w = sw(1154), h = sw(623) } } animate(600, -60, 2, 1500, function(player) dxDrawImage(pos["panel"].x, pos["panel"].y, pos["panel"].w, pos["panel"].h, ui.panel) end)