This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Remove focuspolicy#230
Merged
Merged
Conversation
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
bonsairobo
reviewed
Jul 12, 2023
Owner
Author
|
Had a discussion about this offline.
|
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
FocusPolicy. This was proving to cause problemsas mod_picking and bevy_ui have some fundamental differences that cannot be reconciled. This has
been replaced by added fields on the
Pickablecomponent. You can use this to override thebehavior of any entity in picking. This allows you to decide if that entity will block lower
entities (on by default), and if that entity should emit events and be hover-able (on by default).
Pickableentity, use the new constvalue
Pickable::IGNORE.Pickablecomponent is now optional. Backends can choose to use it for optimization,but should not filter out entities that do not have this component. An example of an optimization
would be to early exit and stop raycasting once an entity is hit that blocks the entities below
it.
FocusPolicychange, bevy_mod_picking no longer updates the bevy_ui
Interactionstate. This has been replacedwith a
PickInteractioncomponent that serves a similar purpose. This component aggregates thepicking state of an entity (press, hover, none) across all pointers.
PickLayer, used to order data from backends that targets the same render target, suchas multiple render passes on the same window, has been changed from an
isizeto anf32. Thischange was made to support bevy_ui, which is "special" and can be rendered on any camera via a
flag, instead of being rendered with its own camera. The bevy_ui backend now sets the order of any
events emitted to be the camera order plus 0.5, which was not possible with an integer.
PointerInteractioncomponent, which is added to pointers and tracks all entitiesbeing interacted with has changed internally from a hashmap of entities and their
Interactiontoa sorted list of entities and
HitData, sorted by depth. This better reflects how pointer datawould be expected to work, and makes it easier to find the topmost entity under each pointer.
get_nearest_hitmethod added toPointerInteractionPointerInteractionfrom thefocusmodule topointer.