SFML community forums

Help => Window => Topic started by: noodlesgc on November 02, 2009, 04:54:38 am

Title: Changing the Cursor
Post by: noodlesgc on November 02, 2009, 04:54:38 am
Is it possible to change the cursor in SFML?
I suppose a crude hack way to do it would be to hide the cursor, and just track a sprite to mouse coordinates.
Is there a better way to do it?



Thanks
Title: Changing the Cursor
Post by: Laurent on November 02, 2009, 08:04:30 am
No, this is the best solution to do it (and the only one). Why do you think it is a hack?
Title: Changing the Cursor
Post by: Xyro on November 02, 2009, 08:40:13 pm
How would you hide the cursor  :?:
Title: Changing the Cursor
Post by: l0calh05t on November 02, 2009, 08:45:52 pm
sfmlWindow.ShowMouseCursor(false);
Title: Changing the Cursor
Post by: noodlesgc on November 03, 2009, 03:58:35 am
Quote from: "Laurent"
No, this is the best solution to do it (and the only one). Why do you think it is a hack?


I don't know, it just feels weird. It feels like there should be a SetCursorSprite function somwhere.
Title: Changing the Cursor
Post by: Laurent on November 03, 2009, 07:30:25 am
Quote
I don't know, it just feels weird. It feels like there should be a SetCursorSprite function somwhere.

And then what? It would be implemented using the same "hack" ;)
There's no such function in the low-level OS API, if that's what you have in mind.