Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scene2d.ui] Adding support for horizontal scrolling (touch pad and touch screen) + fix fractional scroll events #5463

Closed
wants to merge 1 commit into from

Conversation

jpauty
Copy link
Contributor

@jpauty jpauty commented Dec 1, 2018

Hi,

Since we just start with the new version. I prepared a new PR to fix horizontal scrolling support and fractional scrolling.

Currently horizontal scrolling with a touch pad is not supported. More over, devices which report fractional scrolling values, such as touch pads and mouses with continuous wheels are not supported. The scrolling is super fast, because small scroll increments (0.1) are converted to 1 or -1. See my previous PR for more details.

Cheers,

Julien

Commit message:

Adding support for horizontal scrolling (touch pad and touch screen)

Also, adding support for devices which report fractional scrolling
amounts. E.g. a mouse with a continuous mouse wheel, or a Mac touch
pad. This is currently only supported in lwjgl3. It can probably be
added to android and maybe to gwt.

InputProcessor scrolled method now receives scroll amount for X and
Y. Changed type to float to support devices which report fractional
scroll amounts. Updated InputEvent in scene2d accordingly: added
scrollAmountX, scrollAmountY attributes and corresponding setters and
getters.

Input event queue can receive float scrolling values. Since the queue
stores the events with integers. Scrolling values are stored in fixed
precision format, with 8 bits for the fraction.

Updated backends accordingly: lwjgl, lwjgl3, android and gwt.

@jpauty jpauty changed the title Adding support for horizontal scrolling (touch pad and touch screen) + fix fractional scroll events [Scene2d.ui] Adding support for horizontal scrolling (touch pad and touch screen) + fix fractional scroll events Feb 16, 2019
@jpauty jpauty force-pushed the horizontalScrollSupport branch 2 times, most recently from 390ec12 to d42d679 Compare April 15, 2020 19:50
Also, adding support for devices which report fractional scrolling
amounts. E.g. a mouse with a continuous mouse wheel, or a Mac touch
pad. This is currently only supported in lwjgl3. It can probably be
added to android and maybe to gwt.

InputProcessor scrolled method now receives scroll amount for X and
Y. Changed type to float to support devices which report fractional
scroll amounts. Updated InputEvent in scene2d accordingly: added
scrollAmountX, scrollAmountY attributes and corresponding setters and
getters.

Input event queue can receive float scrolling values. Since the queue
stores the events with integers. Scrolling values are stored in fixed
precision format, with 8 bits for the fraction.

Updated backends accordingly: lwjgl, lwjgl3, android and gwt.
@MrStahlfelge MrStahlfelge added core affecting all platforms enhancement non-breaking w/ config Label for PRs that are non-breaking when configuration or game project is changed labels Aug 27, 2020
@MrStahlfelge
Copy link
Member

I like the addition, but the build fails, there are conflicts and there wasn't any other feedbacks by the community. Closing this, feel free to reopen when merged against the latest version.

@jpauty
Copy link
Contributor Author

jpauty commented Aug 30, 2020

Hi,

I've updated my branch and pushed: https://github.com/jpauty/libgdx/tree/horizontalScrollSupport

I cannot reopen this PR. Should I open a new one ?

@MrStahlfelge
Copy link
Member

Yes, please open a new one - I also cannot reopen it for some reason.

@jpauty
Copy link
Contributor Author

jpauty commented Aug 31, 2020

Please, see this new PR: #6154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core affecting all platforms enhancement non-breaking w/ config Label for PRs that are non-breaking when configuration or game project is changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants