TheSmart Posted December 9, 2015 Share Posted December 9, 2015 Hello guys! today i was going to make something but i want to add special thing on it so i decided to add bouncing in dx gui but i don't know how to use it, i try to understand InterpolateBetween but i failed can someone give me example to how to make it. i want dx bounce start from here dxDrawRectangle(147, 120, 237, 48, tocolor(255, 255, 255, 255), false) and end to here dxDrawRectangle(147, 424, 237, 48, tocolor(255, 255, 255, 255), false) Hope you understand my BAD English Link to comment
#RooTs Posted December 9, 2015 Share Posted December 9, 2015 Hope you understand my BAD English You Speak Portuguese ? Link to comment
TheSmart Posted December 9, 2015 Author Share Posted December 9, 2015 Hope you understand my BAD English You Speak Portuguese ? Nah Urdu Link to comment
Saml1er Posted December 9, 2015 Share Posted December 9, 2015 Aik simple example write ki hai. local start = getTickCount() local time = start + 7000 addEventHandler("onClientRender", root, function () local now = getTickCount() local elapsedTime = now - start local duration = time - start local progress = elapsedTime / duration local _, y = interpolateBetween ( 0, 600, 0, 0, 300, 0, progress, "OutBounce") dxDrawRectangle(147, y, 237, 48, tocolor(255, 255, 255, 255), false) end ) EDIT: thodi se modify kerli hai. Link to comment
TheSmart Posted December 10, 2015 Author Share Posted December 10, 2015 Aik simple example write ki hai. local start = getTickCount() local time = start + 7000 addEventHandler("onClientRender", root, function () local now = getTickCount() local elapsedTime = now - start local duration = time - start local progress = elapsedTime / duration local _, y = interpolateBetween ( 0, 600, 0, 0, 300, 0, progress, "OutBounce") dxDrawRectangle(147, y, 237, 48, tocolor(255, 255, 255, 255), false) end ) EDIT: thodi se modify kerli hai. Thanks yar.. 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