Expand description
A UI-centric focus system for Bevy.
This crate provides a system for managing input focus in Bevy applications, including:
InputFocus
, a resource for tracking which entity has input focus.- Methods for getting and setting input focus via
InputFocus
andIsFocusedHelper
. - A generic
FocusedInput
event for input events which bubble up from the focused entity. - Various navigation frameworks for moving input focus between entities based on user input, such as
tab_navigation
anddirectional_navigation
.
This crate does not provide any integration with UI widgets: this is the responsibility of the widget crate,
which should depend on bevy_input_focus
.
Modules§
- directional_
navigation - A navigation framework for moving between focusable elements based on directional input.
- tab_
navigation - This module provides a framework for handling linear tab-key navigation in Bevy applications.
Structs§
- Auto
Focus - Indicates that this widget should automatically receive
InputFocus
. - Focused
Input - A bubble-able user input event that starts at the currently focused entity.
- Input
Dispatch Plugin - Plugin which sets up systems for dispatching bubbling keyboard and gamepad button events to the focused entity.
- Input
Focus - Resource representing which entity has input focus, if any. Input events (other than pointer-like inputs) will be dispatched to the current focus entity, or to the primary window if no entity has focus.
- Input
Focus Visible - Resource representing whether the input focus indicator should be visible on UI elements.
- IsFocused
Helper - A system param that helps get information about the current focused entity.
- Window
Traversal - These are for accessing components defined on the targeted entity
- Window
Traversal Item - Automatically generated
WorldQuery
item type forWindowTraversal
, returned when iterating over query results.
Enums§
- Input
Focus Set - System sets for
bevy_input_focus
.
Traits§
- IsFocused
- Trait which defines methods to check if an entity currently has focus.
Functions§
- dispatch_
focused_ input - System which dispatches bubbled input events to the focused entity, or to the primary window if no entity has focus.
- set_
initial_ focus - Sets the initial focus to the primary window, if any.