golanu21 Posted January 4, 2014 Share Posted January 4, 2014 local screenx,screeny = guiGetScreenSize() -- animation local state = 'starting' local phase = 0 local alpha = 0 local lastTick = getTickCount() local function getProgress( addtick ) local now = getTickCount() local elapsedTime = now - lastTick local duration = lastTick+addtick - lastTick local progress = elapsedTime / duration return progress end function drawlogpan() local RectangleX,RectangleY = interpolateBetween(x/3.8, y/3.8, 0, x/1.97, y/2.75, 0, getProgress(500), 'InQuad') dxDrawRectangle(RectangleX, RectangleY, x/4, y/3, tocolor(0, 0, 0, 150)) showCursor(false) end addEventHandler ( "onClientGUIClick", loginbtn, function ( ) addEventHandler("onClientRender", getRootElement(), drawlogpan) end, false ) why the interpolateBetween it's not working... the rectangle just appear Link to comment
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