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

Author Topic: Changing the Cursor  (Read 3528 times)

0 Members and 1 Guest are viewing this topic.

noodlesgc

  • Guest
Changing the Cursor
« 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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Changing the Cursor
« Reply #1 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?
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Changing the Cursor
« Reply #2 on: November 02, 2009, 08:40:13 pm »
How would you hide the cursor  :?:

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Changing the Cursor
« Reply #3 on: November 02, 2009, 08:45:52 pm »
sfmlWindow.ShowMouseCursor(false);

noodlesgc

  • Guest
Changing the Cursor
« Reply #4 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Changing the Cursor
« Reply #5 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.
Laurent Gomila - SFML developer