SFML community forums
Help => Window => Topic started by: Xafi on June 20, 2014, 01:15:02 pm
-
I Have a sf::event named event, then if i do a click event.mouseMove.x = 0, how do i can get coordinates without problems?
-
Why do you access the mouse move event if there is a mouse click?
Please read the tutorials, everything is explained.
-
If the event is a mouse click event, the event will not have mouseMove members; use mouseButton members to access the location instead.
Readthis tutorial (http://www.sfml-dev.org/tutorials/2.1/window-events.php). For this specific problem, see this part (http://www.sfml-dev.org/tutorials/2.1/window-events.php#the-mousebuttonpressed-and-mousebuttonreleased-events).