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

Author Topic: Getting coordinates from views?  (Read 1437 times)

0 Members and 1 Guest are viewing this topic.

Hawkpath

  • Newbie
  • *
  • Posts: 4
    • View Profile
Getting coordinates from views?
« 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.

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Getting coordinates from views?
« Reply #1 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

 

anything