SFML community forums

Help => Window => Topic started by: cooky451 on October 15, 2011, 12:28:28 pm

Title: Custom Mouse Cursor
Post by: cooky451 on October 15, 2011, 12:28:28 pm
Hi,

I'm currently using SFML and OpenGL. I now want to implement a custom mouse cursor. Ok, I think I can easily track the mouse position and draw a texture with orthographic projection. But I need a way to prevent the OS from drawing the standard cursor. Is there any way to do this in SFML?

(I'm currently using SFML 1.6, so a solution for this version is preferred.)
Title: Custom Mouse Cursor
Post by: thePyro_13 on October 15, 2011, 12:31:57 pm
Sure, sf::RenderWindow::ShowMouseCursor(bool Show).

Pass in false and SFML will hide the cursor, and you can draw a sprite to replace it.
Title: Custom Mouse Cursor
Post by: cooky451 on October 15, 2011, 12:56:43 pm
Works and works with sf::Window. Thanks. :)