SFML community forums

Help => Window => Topic started by: Hawkpath on January 05, 2011, 03:53:39 pm

Title: Getting coordinates from views?
Post by: Hawkpath on January 05, 2011, 03:53:39 pm
Hey I am making a program and I need it to be a "pannable" program. I need to be able to move around a view that is larger than the screen. So when detecting mouse clicks with window.GetInput().GetMouseX() does that give me the x coordinate of the screen, or the x coordinate of the mouse in the view? If this is the x coordinate in the screen, is there a way to get where the user clicks in the entire view? Thanks for any help.
Title: Getting coordinates from views?
Post by: G. on January 05, 2011, 04:04:20 pm
Quote
http://sfml-dev.org/tutorials/1.6/graphics-views.php
If you want to convert window coordinates to view coordinates, probably after a mouse clic, you can use the RenderWindow::ConvertCoords function