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

Author Topic: fullscreen and mouse position  (Read 2308 times)

0 Members and 1 Guest are viewing this topic.

hythron

  • Newbie
  • *
  • Posts: 8
    • View Profile
fullscreen and mouse position
« on: July 31, 2010, 11:28:24 am »
hey,
When I am switch to fullscreen all graphics become stretched. This is fine.
But the mouse coords are still the same.

So if I run fullscreen a stretched sf::Shape box with an x position of 100px is not   on the exact same location on the screen as GetMouseX() returning 100px.

How can I get the coordinates from stretched graphical objects. Is there some kind of scale value I can use?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
fullscreen and mouse position
« Reply #1 on: July 31, 2010, 12:07:42 pm »
To convert from mouse coordinates to scene coordinates, use window.ConvertCoords.

To convert from local shape coordinates to scene coordinates, use shape.TransformToGlobal.
Laurent Gomila - SFML developer

 

anything