Module hover

Module hover 

Source
Expand description

Determines which entities are being hovered by which pointers.

The most important type in this module is the HoverMap, which maps pointers to the entities they are hovering over.

Structs§

DirectlyHovered
A component that allows users to use regular Bevy change detection to determine when the pointer is directly hovering over an entity. Users should insert this component on an entity to indicate interest in knowing about hover state changes.
HoverMap
The source of truth for all hover state. This is used to determine what events to send, and what state components should be in.
Hovered
A component that allows users to use regular Bevy change detection to determine when the pointer enters or leaves an entity. Users should insert this component on an entity to indicate interest in knowing about hover state changes.
PreviousHoverMap
The previous state of the hover map, used to track changes to hover state.

Enums§

PickingInteraction
A component that aggregates picking interaction state of this entity across all pointers.

Functions§

generate_hovermap
Coalesces all data from inputs and backends to generate a map of the currently hovered entities. This is the final focusing step to determine which entity the pointer is hovering over.
update_interactions
Uses HoverMap changes to update PointerInteraction and PickingInteraction components.
update_is_directly_hovered
Uses HoverMap changes to update DirectlyHovered components.
update_is_hovered
Uses HoverMap changes to update Hovered components.