Jump to content

Hiding DX Rectangle


drk

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...