Skip to content

Conversation

@jfreire-unity
Copy link
Collaborator

@jfreire-unity jfreire-unity commented Apr 12, 2023

Description

This PR allows dispatching repeated Next/Previous navigation events while a control is still pressed.

Changes made

It removes the callbacks when the _nextPreviousAction is performed.
The logic is now in DirectionNavigation() method running in every Update() call.

Notes

⚠️ Depends on the latest commits from trunk
At the moment, it only detects Shift or Shift+Tab as Next/Previous bindings (same as #1667). A configuration to set up these bindings for the Input System is necessary. The Input Manager provides configuration for this.

Currently it doesn't deal with keys other than tab and shift+tab. Discussion needs to happen to allow configuration for this with the Input System.
@jfreire-unity
Copy link
Collaborator Author

@benoit-alain let me know if this works for you when using the Input System integration.

@jfreire-unity jfreire-unity merged commit 9ad5c78 into dmytro/common-input-api-for-ui Apr 20, 2023
@jfreire-unity jfreire-unity deleted the input-for-ui/next-previous-repetition branch April 20, 2023 15:34
jfreire-unity added a commit that referenced this pull request May 23, 2023
* Adding dependency to a provider package

* wip

* wip

* wip

* wip

* wip

* wip

* sorting of events and filtering of pointer events

* pointer indices

* more robust scroll events

* forgot to reset state flags

* trying out to use touchscreen for finger index

* removing leftovers

* Add dispatch of navigation events for InputForUI (#1667)

* Add dispatch of navigation events

* Fix formatting

* Unifies GetEventSource() for callback context and devices

* Use DispatchFromCallback and clean todos

* InputForUI: Add repetition for Next/Previous navigation events (#1670)

* Update renaming of Event.CompareType

* Add Next/Previous navigation events repetition

Currently it doesn't deal with keys other than tab and shift+tab. Discussion needs to happen to allow configuration for this with the Input System.

* Set seenTouchEvents and seenTouchEvents for missing control paths and events (#1674)

* fix compilation errors when opening InputSystem project

* fix compilation errors when opening project in older editors

* Bootstrap InputForUI provider only if enabled in the PlayerSettings (ISX-1386)

* Fix null reference errors by not initializing InputForUI in the editor (ISX-1397)

* Fix to avoid PointerEvents from Mouse when using Touch

* Reverse bool logic of resetSeenEventsOnUpdate

* Remove debug logs

* Fix PointerEvents with same pointerIndex for all fingers

* fix InputForUI not being bootstrapped in IL2CPP builds (ISX-1424)

* fix for deprecated warning

* fix for unused variable warning

* run formatting tool

* modify naming to conform to coding convention

* fix for running tests in standalone builds

* Remove commented code and add missing comment

---------

Co-authored-by: Dmytro Ivanov <dmytro@unity3d.com>
Co-authored-by: João <joao.freire@unity3d.com>
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