16
General / Mouse::isButtonPressed(Mouse::Left) vs (event.mouseButton.button == Mouse::Left)
« on: November 05, 2016, 08:27:37 pm »
Let's say we have the event handler with the
and we are looking for
and only if that is true, we are trying to find out which button is actually being pressed,
does it make a difference if we do
or
or are those identical in that situation?
sf::Event event
and we are looking for
event.type == Event::MouseButtonPressed
and only if that is true, we are trying to find out which button is actually being pressed,
does it make a difference if we do
event.mouseButton.button == Mouse::Left
or
Mouse::isButtonPressed(Mouse::Left)
or are those identical in that situation?