Hide mouse if out of game window
BlitzMax Forums/BlitzMax Beginners Area/Hide mouse if out of game window
| ||
Ok, ive replaced the mouse cursor with an image but when the game is in window mode if my mouse moves out of the game window my curor image is still on the game window in the place it last got updated, untill i move the mouse back into the game window. This is a bit ugly, any way to detect if the mouse moves out of the game window? Im using BMAX not BMAX:GUI . |
| ||
Take a look at the docs for 'brl.event'. [edit] Not exactly what you want, but the principle's the same... http://www.blitzbasic.com/Community/posts.php?topic=55104#614304 [/edit] |
| ||
I solved this with my game framework, try the demo (see link in my sig). |
| ||
/me slaps GA with an inflatable Aardvark! |
| ||
Tut Tut Tut Grey |
| ||
Select PollEvent() Case EVENT_MOUSELEAVE mouseHidden=True Case EVENT_MOUSEENTER mouseHidden=False |
| ||
so disaproving ;-) ... I was too busy to post the code + it's complicated (due to API calls to get mouse pos relative to desktop). Anyway rather than just hide it, I made it "slide" out with the framework, this looks the best. |
| ||
lol.. thanks guys. |