Mefisto_PL Posted December 15, 2012 Posted December 15, 2012 How can I make dxDrawRectangle with animate.. For example in scoreboard is drawing, but I want to move my window from left to right. What events/functions I must use for it? I need an answer and I know that is possible ! ///EDIT Or if it's easier I want to drawing it from left to right, I think it's better way
Anderl Posted December 15, 2012 Posted December 15, 2012 Keep track of the positions of the rectangle and keep increasing/decreasing it depending on the movement you want with onClientRender.
Mefisto_PL Posted December 15, 2012 Author Posted December 15, 2012 Hmm, but how I must use InrepolateBetween? : o
Anderl Posted December 16, 2012 Posted December 16, 2012 interpolateBetween will be harder for you, just do the way I told you.
Techial Posted December 16, 2012 Posted December 16, 2012 local an_end = 0 local an_start = 1080/2 -- Depending on screen size local an_val = an_start local posy = 1920/2 local width = 400 local height = 400 function openFunc() if(an_val > an_end) then an_val = an_val - 20 theAnim = dxDrawRectangle(an_val, posy, width, height, tocolor(45,45,45,135), false) end end addEventHandler("onClientRender", root, openFunc)
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