Prof. Monster is back with a brandnew module.
This time it was really complicated :yes:.
It took me a whole day to write the documentation and the picture for this Module. But now it is done.
Prof. Monster presents:[INDENT]Cursor.py
compatible with 2.49 and 2.5x
[/INDENT]What does it do?
This module provides functions to show and hide the system mouse cursor.
It simply provides two BGE callable functions
Nothing fancy for Python coders, but quite nice for the once that do not script.
How does it work?
cut&paste following script into the
- internal text editor or
- a file called Cursor.py which should be located at the blend’s folder
''' Cursor ====== This module provides functions to show and hide the system mouse cursor. ''' import Rasterizer #@UnresolvedImport __version__ = "1.0" __author__ = "Monster" __date__ = "2010-Sep-04" #---- BGE callables #=============================================================================== # show #=============================================================================== def show(): ''' Enables the drawing of the system mouse cursor. ''' Rasterizer.showMouse(1) #=============================================================================== # hide #=============================================================================== def hide(): ''' Disables the drawing of the system mouse cursor. ''' Rasterizer.showMouse(0)
now you can setup logic bricks like these:
Usually you will connect an Always sensor with the Cursor.show module, to make the cursor visible all the time.
Please keep in mind that the Python controller should be in Module mode.
I hope you find this useful