You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change to Interaction::Released instead of Interaction::None for 1 frame as the button is released.
Changelog
Added
Interaction now be considered Interaction::Released for 1 frame when the user has released interaction on the button.
Feedback Wanted / Unresolved Questions
This solution relies on the ui_focus system running for 1 more frame after the interaction has been released, meaning that it does not work currently work when using the "DesktopMode" winit setting that only runs systems when user-input has occurred. It will be stuck in "Released" state until some new input is provided by the user.
This solution relies on the ui_focus system running for 1 more frame after the interaction has been released, meaning that it does not work currently work when using the "DesktopMode" winit setting that only runs systems when user-input has occurred. It will be stuck in "Released" state until some new input is provided by the user.
That's pretty unfortunate. We could add another system at the end of the frame to reset them? Or run for two frames on interaction in DesktopMode.
When does input reset their "just_pressed" / "just_released" states? Is it within the same frame but at the end of the update stage?
Near the start of each frame in PreUpdate. I actually think this is a bit of a mistake, as it wreaks havoc with things like fixed time steps, but that's the current strategy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleX-Needs-SMEThis type of work requires an SME to approve it.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Fix #5769
Solution
Change to
Interaction::Releasedinstead ofInteraction::Nonefor 1 frame as the button is released.Changelog
Added
Interactionnow be consideredInteraction::Releasedfor 1 frame when the user has released interaction on the button.Feedback Wanted / Unresolved Questions
This solution relies on the ui_focus system running for 1 more frame after the interaction has been released, meaning that it does not work currently work when using the "DesktopMode" winit setting that only runs systems when user-input has occurred. It will be stuck in "Released" state until some new input is provided by the user.
Any ideas as to how that can be solved?