bad skull Posted July 11, 2020 Posted July 11, 2020 como faço pra animar um painel dx?, quando eu apertar uma tecla pra abrir ele abrir com alguma animação esse é meu codigo : local mostrar = false cor = {} function pdx() if mostrar == true then dxDrawRectangle(575, 230, 217, 309, tocolor(11, 11, 11, 178), false) dxDrawRectangle(575, 230, 217, 28, tocolor(21, 21, 21, 255), false) cor [1] = tocolor(0, 0, 0, 255) if isMouseInPosition(631, 369, 104, 29) then cor [1] = tocolor(0, 255, 0, 120) end dxDrawRectangle(631, 369, 104, 29, cor [1], false) dxDrawText("PEGAR", 631, 369, 736, 398, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawRectangle(575, 511, 217, 28, tocolor(21, 21, 21, 255), false) end end addEventHandler("onClientRender", root, pdx) function abrirdx() if mostrar == false then showCursor(true) mostrar = true addEventHandler("onClientRender", root,pdx) else showCursor(false) mostrar = false removeEventHandler("onClientRender", root, pdx) end end bindKey("x", "down", abrirdx) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end
Moderators Lord Henry Posted July 12, 2020 Moderators Posted July 12, 2020 InterpolateBetween 1 1 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now