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

Author Topic: [MAC OS X - SFML2] GetMouseX() after SetCursorPosition(x,y)  (Read 8840 times)

0 Members and 1 Guest are viewing this topic.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
[MAC OS X - SFML2] GetMouseX() after SetCursorPosition(x,y)
« Reply #15 on: December 10, 2010, 03:34:20 pm »
You don't plan to change this behaviour, do you ?

If you do plan to modify this I've got an idea (meanly inspired by some code pattern I've seen in obj-c).

BTW, I've committed a fix for the original bug.  :wink:
SFML / OS X developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[MAC OS X - SFML2] GetMouseX() after SetCursorPosition(x,y)
« Reply #16 on: December 10, 2010, 03:56:43 pm »
Quote
You don't plan to change this behaviour, do you ?

No, unless I decide to plug sf::Input to the OS rather than to sf::Event. This is in the task list but I don't think that I'll do it, actually.

Quote
If you do plan to modify this I've got an idea (meanly inspired by some code pattern I've seen in obj-c).

Do we really need an "idea"? Calling the GetCursorPos() function of the OS API should be enough ;)
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
[MAC OS X - SFML2] GetMouseX() after SetCursorPosition(x,y)
« Reply #17 on: December 10, 2010, 04:06:36 pm »
In fact, I wasn't thinking about Input class at all.

We could have in Window class something like a friend method with our WindowImpl and when we ask for a new WindowImpl, we give as parameter a Window such that the WindowImpl could call the friend method to set the initial cursor pos.

However, it may look a little bit overkill compared to calling the GetCursorPos() function inside Input... At least all the OS-impl is in the same place. :roll:
SFML / OS X developer

 

anything