Skip to main content

spatial_focus_next

Function spatial_focus_next 

Source
pub fn spatial_focus_next(
    chain: &[u64],
    hit_regions: &[HitRegion],
    current: Option<u64>,
    dir: FocusDirection,
) -> Option<u64>
Expand description

Find the next focusable element in a given spatial direction.

Uses the bounding rects from hit_regions to determine which element is “next” in the given direction from the currently focused element.