Jump to content

dxDraw destroy


dugasz1

Recommended Posts

Hello! How i can destroy this dxDraws, to the player don't see it?

    dxDrawRectangle (1, 2, 700, 700, tocolor ( 0, 0, 0, 150 ) ) 
    dxDrawText ( "Welcome test", 1, 2, 10, 10, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" )  
  

Link to comment

You can't destroy DX drawings because they don't exist. They don't exist because DX drawing functions don't create anything. All what they do is changing the colors of some pixels on the screen. Our minds interpret these areas of pixels as distinct elements. What's more, since the game redraws the view every frame (therefore removing any color changes done by DX drawing functions), even if we consider them distinct elements, they still disappear quickly after being drawn. But if you call drawing functions every frame, colors of pixels are changed again and again, and our minds interpret this as continuous existence of some distinct element. And if you stop calling the drawing functions (such as removeEventHandler, like Castillo said, or using if ... then ... end condition blocks), the colors of pixels will stop being changed, resulting in illusion of disappearance of something that doesn't actually exist. Therefore DX drawings in some sense are creations of our tricky minds. I hope this philosophy will help you to understand how DX drawings work :)

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...