drk Posted October 7, 2011 Share Posted October 7, 2011 Hi ! I'm creating a Login / Register System in DX Rectangle, but I dont know to assign a variable to the Rectangle and how to hide the Rectangle. Anyone can help me ? Link to comment
karlis Posted October 7, 2011 Share Posted October 7, 2011 just don't draw it to show something you have to draw it every frame anyway. Link to comment
drk Posted October 7, 2011 Author Share Posted October 7, 2011 LoL I dont understand DX. I dont know how to do it. '-' Link to comment
DakiLLa Posted October 7, 2011 Share Posted October 7, 2011 Hmm, lets assume you have a var containing the rectangle alpha (for example): local rcAlpha = 255; function drawMyRec() dxDrawRectangle( x, x, x, x, tocolor( 0, 0, 0, rcAlpha ), false ) --replace 'x' with your screen coordinates end addEventHandler( "onClientRender", root, drawMyRec ) So when you need to hide it, you just set rcAlpha to zero, or you just do removeEventHandler( "onClientRender", root, drawMyRec ) to entirely stop the drawing of your rectangle. As you can see, there are different ways of doing what you want (if I understood correctly what you want, ofcourse...) Link to comment
drk Posted October 7, 2011 Author Share Posted October 7, 2011 Ooow ! Now I understand ! Thank you very much DakiLLa ;D EDIT: I'm creating a Login / Register System, but the GUI Window is a shit, I prefer in DX. 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