Hi!
I am using processings P2D renderer and want to change the cursor icon when it has a specific location. This works as expected without the renderer, but with P2D the cursor changes to my computers default cursor after the program has been running for less than a minute and doesn’t change icon when it should. Here’s an example:
According to Processings cursor() reference, P2D uses a different set of cursors, but after less than a minute of the example above, the cursor changes to my default cursor again.
I’ve tried moving the code in draw() to mouseMoved() but the same result occurs.
I’ve also tried to replace the cursors with images of cursors with cursor(my_cursor_img), but the same thing happens.
Right now the only solution I see is setting the cursor to noCursor() in setup and calling image(my_cursor_img, mouseX, mouseY) every frame, but that doesn’t seem like the optimal solution.
@Bjoe – were you able to resolve this issue? It sounds like it might be a bug worth reporting – along with specific details about your operating system / version:
Your solution works!
I never thought of only calling the function at transitions, especially since the example at the reference page calls it every frame.