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

Author Topic: SetCursor() for sf::Window  (Read 4144 times)

0 Members and 1 Guest are viewing this topic.

lotios611

  • Newbie
  • *
  • Posts: 32
    • View Profile
SetCursor() for sf::Window
« on: August 05, 2010, 06:44:31 pm »
I think it would be nice to be able to set the window's cursor.

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
SetCursor() for sf::Window
« Reply #1 on: August 05, 2010, 06:57:41 pm »
Hide the windows cursor and use a sprite has a custom one?

lotios611

  • Newbie
  • *
  • Posts: 32
    • View Profile
SetCursor() for sf::Window
« Reply #2 on: August 05, 2010, 07:13:53 pm »
That's what I was thinking of doing for now, I just think that it would be nice if it was easier than that.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SetCursor() for sf::Window
« Reply #3 on: August 05, 2010, 09:29:13 pm »
Quote
I just think that it would be nice if it was easier than that

Do you really think it's difficult?
Laurent Gomila - SFML developer

lotios611

  • Newbie
  • *
  • Posts: 32
    • View Profile
SetCursor() for sf::Window
« Reply #4 on: August 05, 2010, 10:32:15 pm »
Quote from: "Laurent"
Quote
I just think that it would be nice if it was easier than that

Do you really think it's difficult?

I meant it would be shorter.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SetCursor() for sf::Window
« Reply #5 on: August 05, 2010, 10:56:12 pm »
I can't make every feature fit in a single function call. Shorter is not always better.
Laurent Gomila - SFML developer

Tronic

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://performous.org/
SetCursor() for sf::Window
« Reply #6 on: August 13, 2010, 02:55:27 am »
This SetCursor should use a hardware cursor, which is not possible to do if you simply paint a sprite yourself. The hardware cursor has lower lag (doesn't need to wait for next OpenGL frame to get displayed) and in windowed mode it may partially go outside window borders.

The drawbacks of a hardware cursor are that RGBA cursors might not be supported on all platforms and that the maximum size of the cursor might also be limited.

Still, I think this feature should be added, even if not high priority.

 

anything