SFML community forums
Help => Window => Topic started by: Crank1d on March 12, 2010, 05:51:33 pm
-
I am new to SFML, so I still learn new stuff about library everyday but I am interested is it possible to combine event types? For example, i want to create rotational camera with OpenGL which user rotates when he press right mouse button and moves mouse. Ive tried something like this:
if ((Event.Type == sf::Event::MouseButtonPressed || sf::Event::MouseMoved) && (sf::Mouse::Right))
but it doesn´t do nothing.
If needed, I would post whole source code of application.
-
You don't want to combine mouse pressed + mouse moved, you want to react on mouse move when the mouse button is pressed, which is something different ;)
if (Event.Type == sf::Event::MouseMoved && Window.GetInput().IsMouseButtonDown(...))
-
Thanks Laurent! Everything works just fine, you rule. 8)