SFML community forums

Help => Window => Topic started by: Xafi on June 20, 2014, 01:15:02 pm

Title: [sf::Event] problem with mouseMove
Post 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?
Title: Re: [sf::Event] problem with mouseMove
Post by: Nexus on June 20, 2014, 01:23:04 pm
Why do you access the mouse move event if there is a mouse click?

Please read the tutorials, everything is explained.
Title: Re: [sf::Event] problem with mouseMove
Post by: Hapax on July 01, 2014, 04:50:46 pm
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).