Hello all,
I am trying to return my mouse cursor position so I can check to see if something is clicked or not.
Currently this is my code
sf::Event currentEvent;
while(m_GameWindow.PollEvent(currentEvent))
{
if(currentEvent.Type == sf::Event::MouseButtonPressed)
{
sf::Vector2i mouse_pos = sf::Mouse::GetPosition();
bool clicked = TravelBoard.CheckForTilesClicked(mouse_pos);
std::cout<<clicked<<std::endl;
}
}
when I print my pos.x and pos.y they are much higher than they should be, for instance if I click as close to the top left of the screen as possible i get something like (1028,698) instead of something closer to (0,0).
What am i doing wrong in this instance to get a larger position than the one I should be getting?
Thanks!