SFML community forums
Help => Window => Topic started by: hythron 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?
-
To convert from mouse coordinates to scene coordinates, use window.ConvertCoords.
To convert from local shape coordinates to scene coordinates, use shape.TransformToGlobal.