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

Author Topic: System cursors  (Read 10331 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: System cursors
« Reply #15 on: January 21, 2015, 11:17:18 pm »
The PR misses implementation for OS X and Windows. If you won't be adding support for these OS, the PR won't get directly accepted, but someone might one day rebase their work on your commit.

As for the implementation, what exactly does "cursorId" represent? How would the user know what cursor they're setting? You also used the same variable for the Windows implementation, which makes you wonder even more, who could guarantee that the cursorId on Linux uses the same cursor style as on Windows?
I think we can't deal with a simple integer here but instead should use an enum or similar.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

cheeseboy

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: System cursors
« Reply #16 on: January 22, 2015, 12:23:06 am »
I did Linux implementation first because I'm on Linux, I wanted to be sure I did that right before moving on. I can do windows via mingw but I'd have no way of testing OS X.

The linux cursors are here:
http://tronche.com/gui/x/xlib/appendix/b/

Windows are here:
http://msdn.microsoft.com/en-us/library/ms648391%28v=vs.85%29.aspx

I haven't found anything for  OS X yet.

I wasn't sure where I should put the enum and if it should limit it to only common cursors. So I just made a basic function for now. Also I was going to write a function to set cursor to image but I wasnt sure If I should make a createcursor() or a setcursor() that takes sf::image or something...


Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: System cursors
« Reply #17 on: January 22, 2015, 05:55:22 pm »
Inspiration for OS X.

All of this has happened before and will happen again.
SFML / OS X developer