简体   繁体   中英

Texture2D to front

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

The mouse pointer and the blocks are Texture2D s, is it possible to draw the pointer in front of the other textures? 在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM