Mefisto_PL Posted December 15, 2012 Share 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 Link to comment
Anderl Posted December 15, 2012 Share 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. Link to comment
Mefisto_PL Posted December 15, 2012 Author Share Posted December 15, 2012 Hmm, but how I must use InrepolateBetween? : o Link to comment
Anderl Posted December 16, 2012 Share Posted December 16, 2012 interpolateBetween will be harder for you, just do the way I told you. Link to comment
Techial Posted December 16, 2012 Share 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) 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