SFML community forums
Help => General => Topic started by: forrestcupp on August 03, 2009, 11:33:33 pm
-
Is it possible to get mouse wheel movement from an sf::Input instead of from an sf::Event? If not, this would be a very useful thing to add.
I have a class with a function that takes a pointer to my Input, which means it has to be called after the Event loop. I need to get mouse wheel movement in that function. I tried passing a pointer to the RenderWindow as a parameter and calling GetEvent. Since it's after the Event loop, that only works about once every 5 times the wheel is moved.
I'd really rather not have to have a whole separate function just to get wheel movement. Is there any way around this?
-
Well, it's wouldn't make sense. The mouse wheel doesn't have a persistent state, it just triggers events and then always goes back to its original state. I can't return a "current value" or something like this.
-
I understand what you're saying.
I found another way to implement what I need to do without using an extra function, so I'll be alright anyway.
Thanks.