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

Author Topic: [sf::Event] problem with mouseMove  (Read 2482 times)

0 Members and 1 Guest are viewing this topic.

Xafi

  • Newbie
  • *
  • Posts: 18
  • My project, http://1ndieidea.hol.es/
    • View Profile
[sf::Event] problem with mouseMove
« 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?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: [sf::Event] problem with mouseMove
« Reply #1 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: [sf::Event] problem with mouseMove
« Reply #2 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. For this specific problem, see this part.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything