Texture2D to front

61 views Asked by At

Is there any option to set the mouse texture to the front of the screen?

The mouse pointer and the blocks are Texture2Ds, is it possible to draw the pointer in front of the other textures? enter image description here

1

There are 1 answers

1
Steve H On BEST ANSWER

There is a SpriteBatch.Draw() overload that allows you to set the layer depth. setting it to 0 places the texture in front and setting it to 1 places it in the back. But it only applies within a Begin/end block.

Most likely, you can achieve what you want by simply drawing it last and it will go on top(or front) of all other drawn items.