Reputation: 21
How can I change the mouse cursor in Processing to a png with transparency?
Only in the application window.
Upvotes: 0
Views: 7599
Reputation: 347
Try this:
PImage mouseCursor;
void setup() {
size(640,480);
mouseCursor = loadImage("MouseCursor.png");
}
void draw()
{
if(mouseX < 100) {
cursor(mouseCursor, 0, 0);
} else {
cursor(HAND);
}
}
Upvotes: 4