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

Author Topic: Mouse button press with mouse left checker is never true  (Read 1508 times)

0 Members and 1 Guest are viewing this topic.

Canvas

  • Full Member
  • ***
  • Posts: 107
    • View Profile
Mouse button press with mouse left checker is never true
« on: January 17, 2014, 08:58:45 pm »
Hello there SFML people,

I'm trying to do a simple left mouse button check event, but every time I use my left button on my mouse the if statement is never true :( can anyone see why in my code?

if (eve.type == sf::Event::MouseButtonPressed)
         {
            if (eve.mouseButton.button == sf::Mouse::Left)
            {
            result = true;
            }
         }

the if statement is copied from the 2.1 tutorials

Regards,

Canvas

Daddi

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
    • http://foxdev.de/
    • Email
Re: Mouse button press with mouse left checker is never true
« Reply #1 on: January 17, 2014, 09:00:09 pm »
How do you check if its true?

nebula

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Email
Re: Mouse button press with mouse left checker is never true
« Reply #2 on: January 17, 2014, 09:56:16 pm »
more code :D