Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Custom Mouse Cursor  (Read 5306 times)

0 Members and 1 Guest are viewing this topic.

cooky451

  • Newbie
  • *
  • Posts: 2
    • View Profile
Custom Mouse Cursor
« 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.)

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
Custom Mouse Cursor
« Reply #1 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.

cooky451

  • Newbie
  • *
  • Posts: 2
    • View Profile
Custom Mouse Cursor
« Reply #2 on: October 15, 2011, 12:56:43 pm »
Works and works with sf::Window. Thanks. :)