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

Author Topic: Window.GetInput().GetMouseX()  (Read 2528 times)

0 Members and 1 Guest are viewing this topic.

e_barroga

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Window.GetInput().GetMouseX()
« on: June 28, 2009, 10:44:55 pm »
I've noticed that GetMouseX() returns an int.

Why is it an int, shouldn't it return unsigned int?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Window.GetInput().GetMouseX()
« Reply #1 on: June 28, 2009, 11:24:09 pm »
It is relative to the window, which means that it can be negative if it's outside.
Laurent Gomila - SFML developer

e_barroga

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Window.GetInput().GetMouseX()
« Reply #2 on: June 29, 2009, 02:22:26 am »
Yes, that's what I assumed but after I tested.... it is restricted to a positive number.

Try it.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Window.GetInput().GetMouseX()
« Reply #3 on: June 29, 2009, 07:54:18 am »
Quote
it is restricted to a positive number.

...on your OS.
Laurent Gomila - SFML developer