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

Author Topic: Mouse scroll wheel input  (Read 3682 times)

0 Members and 1 Guest are viewing this topic.

OdraEncoded

  • Newbie
  • *
  • Posts: 7
    • View Profile
Mouse scroll wheel input
« on: March 09, 2011, 01:58:13 pm »
Hi, is there a built in implementation of mouse scroll wheel values in sf::Input? I found out you can use sf::Event but I couldn't find it in sf::Input. Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Mouse scroll wheel input
« Reply #1 on: March 09, 2011, 02:06:37 pm »
No, because the mouse wheel has no state. It can only trigger a relative delta, there's no "absolute" wheel position.
Laurent Gomila - SFML developer

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Mouse scroll wheel input
« Reply #2 on: March 09, 2011, 06:54:15 pm »
You could maintain two internal values counting the number of up and down scrolls that has been performed.

 

anything