[Bf-python] Window.Set/GetMouseCursor()

Michael Schardt M.Schardt at web.de
Wed Apr 18 10:52:26 CEST 2007


Hi all!

I wanted to ask if we should have functions in the Window module to set/get  the mousecursor type. Currently there's only WaitCursor().
Sometimes it might be nice to have other cursors available as well - like the helpcursor or editcursor (crosshair).
I have written code for Window.SetMouseCursor() and Window.GetMouseCursor() functions.
The available cursortypes are stored in a new dictionary: Window.Cursors = {STD, NONE, CROSS, WAIT, HELP, PAINT, TEXT} similar to the windowtypes
Setting the help-mousecursor would be done with Window.SetMouseCursor(Window.Cursors.HELP)
If called without argument, Window.SetMouseCursor()  restores the default cursor (same as if it were called with Window.Cursors.STD as argument).
The GetMouseCursor() function returns an integer which can be compared against the values in the dictionary, or -1 for unknown cursortype.
What do you think?
Also - if something like this would be integrated, should all cursor types be supported or just the ones above?
In Blender BIF_graphics.h there are even more types available like CURSOR_X_MOVE, CURSOR_Y_MOVE, CURSOR_PENCIL,... 
Some of them are just the standard arrow cursor although they have a different name.

Michael






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20070418/cc7c567e/attachment.html>


More information about the Bf-python mailing list