Hello. I need to check if both lmb and rmb is pressed. How can i do that?
if (event.type == sf::Event::MouseButtonPressed)
{
if (event.mouseButton.button == sf::Mouse::Left && event.mouseButton.button == sf::Mouse::Right)
std::cout << "LMB+RMB\n";
else if (event.mouseButton.button == sf::Mouse::Left)
std::cout << "LMB\n";
else if (event.mouseButton.button == sf::Mouse::Right)
std::cout << "RMB\n";
}
That code I have now and it is obvious that not work, but how to do that properly?