Skip to main content

dispatch_toggle_to_script

Function dispatch_toggle_to_script 

Source
pub fn dispatch_toggle_to_script<H: ScriptHost + Resource<Mutability = Mutable>>(
    host: ResMut<'_, H>,
    events: MessageReader<'_, '_, ToggleChanged>,
    ids: Query<'_, '_, &LumenId>,
    out: MessageWriter<'_, ScriptCommandEvent>,
)
Expand description

Forward lumen_primitives::ToggleChanged as on_toggle(id, checked) (bool), with per-id handler routing via on("toggle", "<id>", "<fn>").