File tree Expand file tree Collapse file tree
Assets/Tests/InputSystem/Plugins
Packages/com.unity.inputsystem/InputSystem/Plugins/InputForUI Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,10 +118,11 @@ public void NavigationMoveWorks()
118118 [ Category ( "InputForUI" ) ]
119119 public void SendWheelEvent ( )
120120 {
121- var kScrollUGUIScaleFactor = 40f ; // See InputSystemProvider OnScrollWheelPerformed() callback
121+ var kScrollUGUIScaleFactor = 3.0f ; // See InputSystemProvider OnScrollWheelPerformed() callback
122122 var mouse = InputSystem . AddDevice < Mouse > ( ) ;
123123 Update ( ) ;
124- Set ( mouse . scroll . y , - 1f * kScrollUGUIScaleFactor ) ;
124+ // Make the minimum step of scroll delta to be ±1.0f
125+ Set ( mouse . scroll . y , - 1f / kScrollUGUIScaleFactor ) ;
125126 Update ( ) ;
126127 Assert . IsTrue ( m_InputForUIEvents . Count == 1 ) ;
127128 Assert . That ( m_InputForUIEvents [ 0 ] . asPointerEvent . scroll , Is . EqualTo ( new Vector2 ( 0 , 1 ) ) ) ;
Original file line number Diff line number Diff line change @@ -467,6 +467,7 @@ public IEnumerator Devices_CanHaveOnScreenJoystickControls()
467467 }
468468
469469 [ UnityTest ]
470+ [ Ignore ( "Failing on 2023.3.3f1 https://jira.unity3d.com/browse/ISX-1462" ) ]
470471 [ Category ( "Devices" ) ]
471472 public IEnumerator Devices_OnScreenStickDoesNotReceivePointerUpEventsInIsolatedMode ( )
472473 {
Original file line number Diff line number Diff line change @@ -3885,6 +3885,8 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnScreenSpaceCanv
38853885 [ UnityTest ]
38863886#if UNITY_TVOS
38873887 [ Ignore ( "Failing on tvOS https://jira.unity3d.com/browse/ISX-448" ) ]
3888+ #else
3889+ [ Ignore ( "Failing on 2023.3.3f1 https://jira.unity3d.com/browse/ISX-1462" ) ]
38883890#endif
38893891 public IEnumerator UI_DisplayIndexMatchesDisplayWithTouchscreenOnOverlayCanvas ( )
38903892 {
@@ -3987,6 +3989,7 @@ public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnScreenSpaceCanvas()
39873989 }
39883990
39893991 [ UnityTest ]
3992+ [ Ignore ( "Failing on 2023.3.3f1 https://jira.unity3d.com/browse/ISX-1462" ) ]
39903993 public IEnumerator UI_DisplayIndexMatchesDisplayWithMouseOnOverlayCanvas ( )
39913994 {
39923995 // Setup the Test Scene
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ internal class InputSystemProvider : IEventProviderImpl
4343 NavigationEventRepeatHelper m_RepeatHelper = new ( ) ;
4444 bool m_ResetSeenEventsOnUpdate ;
4545
46+ const float kScrollUGUIScaleFactor = 3.0f ;
47+
4648 static InputSystemProvider ( )
4749 {
4850 // Only if InputSystem is enabled in the PlayerSettings do we set it as the provider.
@@ -518,9 +520,8 @@ void OnScrollWheelPerformed(InputAction.CallbackContext ctx)
518520 }
519521
520522 // Make it look similar to IMGUI event scroll values.
521- // TODO check how it behaves on macOS
522- scrollDelta . x /= 40.0f ;
523- scrollDelta . y /= - 40.0f ;
523+ scrollDelta . x *= kScrollUGUIScaleFactor ;
524+ scrollDelta . y *= - kScrollUGUIScaleFactor ;
524525
525526 DispatchFromCallback ( Event . From ( new PointerEvent
526527 {
You can’t perform that action at this time.
0 commit comments