Hide mouse if out of game window

BlitzMax Forums/BlitzMax Beginners Area/Hide mouse if out of game window

coffeedotbean(Posted 2006) [#1]
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 .


Yan(Posted 2006) [#2]
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]


Grey Alien(Posted 2006) [#3]
I solved this with my game framework, try the demo (see link in my sig).


Yan(Posted 2006) [#4]
/me slaps GA with an inflatable Aardvark!


H&K(Posted 2006) [#5]
Tut Tut Tut Grey


Scott Shaver(Posted 2006) [#6]
		Select PollEvent()
    			Case EVENT_MOUSELEAVE
				mouseHidden=True
    			Case EVENT_MOUSEENTER
				mouseHidden=False




Grey Alien(Posted 2006) [#7]
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.


coffeedotbean(Posted 2006) [#8]
lol.. thanks guys.