fumieval / free-game

The free game engine
http://hackage.haskell.org/package/free-game
BSD 3-Clause "New" or "Revised" License
64 stars 15 forks source link

Mouse wheel #35

Closed Fuuzetsu closed 10 years ago

Fuuzetsu commented 10 years ago

I don't see any means of detecting mouse-wheel events, notably scrolling up and down. Am I missing something or is the functionality just missing?

fumieval commented 10 years ago

Sorry, I neglected to handle wheels. Does something like this satisfy? Then I'll add soon.

scrollAmount :: Mouse m => m Vec2 -- Returns the amount of scrolling from the previous frame
Fuuzetsu commented 10 years ago

That should work. My actual use-case was to be able to detect scroll up/down events by the user like we can do with Key but we can implement it in terms of scrollAmount.

fumieval commented 10 years ago

Now we have mouseScroll :: Mouse m => m Vec2 since 1.1.80.