-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
add RequiresHover field to StatefulInteractable #11394
add RequiresHover field to StatefulInteractable #11394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
Just for additional info - this change is needed to allow us triggering buttons in mb only if the button is still hovered (eg user presses button down, moves pointer out of interactable - button should not trigger).
@Zee2 / @davidkline-ms do you think this change makes sense or is there another way to get the same behaviour with existing mrtk functionality?
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
* add RequiresHover field to StatefulInteractable * renaming, refactoring (accoring to PR comments)
Overview
Added a (default false) "RequiresHover" field to StatefulInteractable, of which the only inheritor in the package is PressableButton. Setting this field to true (through inspector or code) prevents basic (also non-MRTK) interactors to trigger a OnClick event when not hovering and ending the selection (on button release, etc.).
Changes
Verification