Skip to main content

sync_tab_selected

Function sync_tab_selected 

Source
pub fn sync_tab_selected(
    commands: Commands<'_, '_>,
    store: Res<'_, PropertyStore>,
    buttons: Query<'_, '_, (Entity, &TabStripButton, Option<&Selected>)>,
)
Expand description

Maintain the Selected marker across every tab strip: the button whose value matches its bound signal’s current value carries it; all its siblings shed it. Idempotent per tick - insert / remove only fire on actual transitions, so archetypes stay put on idle frames.