jMonkeyEngine-Contributions / Lemur

Lemur is a jMonkeyEngine-based UI toolkit.
http://jmonkeyengine-contributions.github.io/Lemur/
BSD 3-Clause "New" or "Revised" License
116 stars 32 forks source link

Add hover mouse wheel scroll support to ListBox #44

Closed pspeed42 closed 7 years ago

pspeed42 commented 7 years ago

This may or may not be related to #43 because there are a few ways I can think to do this.

Approach one: Use mouse events through the picking after #43 is implemented. The issue here is catching the events when they might be intercepted by the list box elements, etc.

Approach two: On list enter/exit or focus/unfocus, register to pick up standard scroll up/down events from InputMapper. This is better for lots of reasons as it potentially lets us use joysticks, etc. for scrolling. The down side is similar to approach one in that enter/exit isn't hierarchical and focus/unfocus just for mouse over is probably too heavy.

May have to do both approaches... allow InputMapper style inputs on focus gain/loss but still use mouse motion events for standard hover + mouse wheel. Unless we want to act like Windows where a click is required before the mouse wheel can scroll and focus is never really where you want it to be. :-/

pspeed42 commented 7 years ago

Approach one has been implemented for ListBox in commit: https://github.com/jMonkeyEngine-Contributions/Lemur/commit/19bca8afeb707813bd55a7eb1637a3e347675676

pspeed42 commented 7 years ago

Breaking the other parts out into their own issues... so this one can be considered "done".