Hello,
I wanted to mention a few things, that are maybe bugs?
If you set a custom cursor, this will remove the custom cursor (should it do that?)
props = WindowProperties()
props.setCursorHidden(True)
base.win.requestProperties(props)
...do other stuff...
props = WindowProperties()
props.setCursorHidden(False)
base.win.requestProperties(props)
IMO it should restore the custom cursor afterwards, I dunno though.
Also, if you have a custom cursor set, a call to
props = WindowProperties()
print props.getCursorFilename()
base.win.requestProperties(props)
will return… some ‘empty’ form of something. I dunno what it is completely, it just prints a few spaces or so.
If you test the return value of props.getCursorFilename (while a custom cursor icon is set) and try to compare it to None
if props.getCursorFilename():
print 'Hello world!'
It will segmentation fault… which albeit is a bug.
I managed to work around both the problems with my own variable to store the cursor icon I set, and restore it after I show it again, which works for me. I think these are probably bugs though so I wanted to ask if they where and report them in the case that they are.
Best of luck,
~powerpup118