Skip to content

Apply the same scale factor as InputForUI InputManager provider for scroll delta#1690

Merged
jfreire-unity merged 5 commits intodevelopfrom
input/input-for-ui-isx-mouse-scroll-delta-same-as-im
Jun 22, 2023
Merged

Apply the same scale factor as InputForUI InputManager provider for scroll delta#1690
jfreire-unity merged 5 commits intodevelopfrom
input/input-for-ui-isx-mouse-scroll-delta-same-as-im

Conversation

@jfreire-unity
Copy link
Copy Markdown
Collaborator

@jfreire-unity jfreire-unity commented Jun 13, 2023

Description

The goal of this PR is to update the InputForUI provider with the latest changes that are about to be introduced on trunk that fix a high user-pain issue (IN-24517).

Changes made

Applies the same scale factor as the Input Manager provider, that's consistent with UGUI values.

Notes

⚠️ Should only be merged when there are changes in trunk.

@jfreire-unity jfreire-unity changed the title Apply same scale factor for mouse scroll delta as IM (ISX-1428) Apply IM provider scale factor for mouse scroll delta (ISX-1428) Jun 20, 2023
@jfreire-unity jfreire-unity marked this pull request as ready for review June 20, 2023 14:12
@jfreire-unity jfreire-unity changed the title Apply IM provider scale factor for mouse scroll delta (ISX-1428) InputForUI: Apply IM provider scale factor for mouse scroll delta (ISX-1428) Jun 20, 2023
@jfreire-unity jfreire-unity changed the title InputForUI: Apply IM provider scale factor for mouse scroll delta (ISX-1428) Apply InputForUI IM provider scale factor for mouse scroll delta (ISX-1428) Jun 20, 2023
@jfreire-unity jfreire-unity changed the title Apply InputForUI IM provider scale factor for mouse scroll delta (ISX-1428) Apply the same scale factor as InputForUI InputManager provider for scroll delta Jun 20, 2023
@jfreire-unity jfreire-unity marked this pull request as draft June 20, 2023 14:21
@jfreire-unity
Copy link
Copy Markdown
Collaborator Author

jfreire-unity commented Jun 20, 2023

I still need to fix tests.

Copy link
Copy Markdown
Collaborator

@lyndon-unity lyndon-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In discussion we aligned that this was good to land.
It relates to the new input system windows backend fix to make sure we take into account the WHEEL_DELTA (120) divisor applied in PlatformDependent/Win/Input/NewInput.cpp

See:
https://github.cds.internal.unity3d.com/unity/unity/pull/30853/files

If input system "input for ui" is used without the backend change the mouse wheel value will be a lot higher but a use can fix by upgrading unity version (Note "input for ui" is also only used in 2023.2+) or by using UGUI event system backend (which was the previous backend).

@jfreire-unity jfreire-unity marked this pull request as ready for review June 20, 2023 16:34
@jfreire-unity
Copy link
Copy Markdown
Collaborator Author

jfreire-unity commented Jun 21, 2023

Some unrelated tests to this PR we're failing and were disabled. Issue raised https://jira.unity3d.com/browse/ISX-1462

@jfreire-unity jfreire-unity merged commit 502e854 into develop Jun 22, 2023
@jfreire-unity jfreire-unity deleted the input/input-for-ui-isx-mouse-scroll-delta-same-as-im branch June 22, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants