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

Author Topic: MouseMoved always true  (Read 1488 times)

0 Members and 3 Guests are viewing this topic.

TheEnigmist

  • Full Member
  • ***
  • Posts: 119
    • View Profile
MouseMoved always true
« on: February 19, 2012, 08:52:27 pm »
I've found that if i use this code somewhere:
Code: [Select]
if (Event.Type == sf::Event::MouseMoved){
std::cout<<"Mouse moved! "<<std::endl;
}

It is always true even if i don't touch mouse. Is it normal?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
MouseMoved always true
« Reply #1 on: February 19, 2012, 08:56:07 pm »
"somewhere" is probably a bad place. The only place where it is supposed to work is inside an event loop.
Laurent Gomila - SFML developer

TheEnigmist

  • Full Member
  • ***
  • Posts: 119
    • View Profile
MouseMoved always true
« Reply #2 on: February 19, 2012, 08:59:14 pm »
Yes, i've placed it in a bad place :) My error :D

 

anything