hiding the cursor
So I have a window with a custom view, while the mouse is within this window I want to hide it and draw my own cursor image, then show it once the mouse leaves the game window.
So I added this to my main loop.
The problem is that once I move the mouse out of the window, there's a huge delay before it's unhidden. I believe, but am not sure, that this is because "mymouse" is updated through the view's mouseMoved event. If this is the case, then is there a way to read the position of the mouse every frame instead of waiting for a mouseMoved event to fire? And if not then what might be the cause?
So I added this to my main loop.
Code:
if ( is_point_in_game_window( mymouse))
[NSCursor hide];
else
[NSCursor unhide];The problem is that once I move the mouse out of the window, there's a huge delay before it's unhidden. I believe, but am not sure, that this is because "mymouse" is updated through the view's mouseMoved event. If this is the case, then is there a way to read the position of the mouse every frame instead of waiting for a mouseMoved event to fire? And if not then what might be the cause?
the solution I've used to this is to define a mouse tracking region that fills the view, and listen to the mouseEntered/mouseExited events.
Hmm good...i was thnking about this kind of code that how we can hide the cursor in the game while playing but i didn't understand one thing that is this code in Java?....colon cleanse reviews
It's Objective-C.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.

