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

Feature request : Support smoothly increasing/decreasing slider value when pressing and holding slider +/- button #63

Closed Ali-RS closed 5 years ago

Ali-RS commented 5 years ago

... while making the speed to be modifiable.

pspeed42 commented 5 years ago

I believe this could pretty easily be wired up externally... but also if that's the case then a standard utility would be nice that could be put into the style definition.

Ali-RS commented 5 years ago

I believe this could pretty easily be wired up externally...

Of course it could, but my main intention is to be able to use this feature in sliders used internally for PropertyPanel,... without hijacking them. So I think it would be best to be addressed properly on Slider.

pspeed42 commented 5 years ago

Yes, but if was done in a way that could be added as styling on the buttons then it doesn't need to be hard-coded into Slider itself. Then users could use whatever method they wanted. hold that slowly increases, hold that increases faster if you move the mouse up/down. Hold that rolls through increments as you move the mouse providing finer grained changes than dragging the slider, etc..

I can pretty much guarantee that if I include code for this in lemur that it won't be hard coded into Slider.

Ali-RS commented 5 years ago

I see, I haven't dealt with lemur styling so didn't know it could be done that way.

pspeed42 commented 5 years ago

I've implemented the basics of this in the built in glass style. The groovy code was simple enough and I wasn't sure where I wanted to put a Java class that did this. The only magic was the new Hover ButtonAction which makes it easy to get per-frame events while the mouse is over a button.

I'm going to close this issue. If you have ideas on how this could/should be extended then feel free to reopen or create a new issue. Else I feel like the spirit of the request has been implemented.

Ali-RS commented 5 years ago

Thanks