Scrolling Game Development Kit Forum
SGDK Version 2 => Help, Errors, FAQ => Topic started by: Tanja on 2008-03-11, 05:02:30 AM
-
can i hide the mouse cursor while the game is running?
-
If you have a program that can create a mouse cursor file, you could create an invisible cursor and load it after InitializeComponent is called with a line like this:
Cursor = new Cursor("empty.cur");
-
this works only in the game window, right? if the player moves the cursor out of the window is there the normal cursor?
-
Yes
-
Would the Cursor.Hide() method be a possible option here? It is full-screen, but couldn't a few events just hide it on mouse enter and show it on mouse exit?
-
Actually Cursor.Hide does exactly what I was thinking my solution would do, I just didn't know about Cursor.Hide. That's a much easier solution. Use Cursor.Hide() instead.
-
eh.... i don't know how to do this, there are no rules for that (hint, hint, as other users would say :laugh:)
-
Create a rule that runs once (During an initialization phase)
do:
System.Windows.Forms.Cursor.Hide
Speaking of which...
BlueMonk: Maybe there should be a simple way to define rules that always run exactly once (per game/per level/per sprite/whatever). Rather than surrounding it in an if (initialized) block in the main code, have a separate area for rules that run during the constructor, or something? It's a very common use case, and while there is already a way to do it, it could be simpler and more efficient.