-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleA new feature, making something new possibleS-BlockedThis cannot move forward until something else changesThis cannot move forward until something else changes
Description
Add automatic layer navigation support (follow-on from automatic directional navigation)
Currently, the algorithm is z-index agnostic - it treats all entities with AutoDirectionalNavigation as a flat set based purely on XY position. So overlapping windows/layers would incorrectly connect to each other.
For proper layer handling, you'd need to:
- Query entities per-layer manually and call
auto_generate_navigation_edges()separately for each layer, OR - Use manual edges to explicitly define cross-layer navigation when desired
To avoid making this PR too large, I would add automatic layer support as a future enhancement. You could:
- Filter by TabGroup component, as suggested!
- Add layer_id field to AutoDirectionalNavigation
- Use parent entity hierarchy to detect separate UI trees
Would like to know if you think it's necessary for this PR to address this, or is a follow-up PR better?
Originally posted by @jbuehler23 in #21668 (comment)
Enable input focs by default - based on @alice-i-cecile feedback on PR #21668
From auto_directional_navigation example, we should enable the input focus plugins by default:
App::new()
// Input focus is not enabled by default, so we need to add the corresponding plugins
.add_plugins((
DefaultPlugins,
InputDispatchPlugin,
DirectionalNavigationPlugin,
))Rename TabGroup to FocusGroup (per @viridia 's suggestion)
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleA new feature, making something new possibleS-BlockedThis cannot move forward until something else changesThis cannot move forward until something else changes