Skip to main content

run_desktop

Function run_desktop 

Source
pub fn run_desktop(
    title: &str,
    size: (u32, u32),
    root: impl FnMut(&mut Scheduler, &RenderContext) -> View + 'static,
) -> Result<()>
Expand description

Desktop entry point. Mounts root with title and size. The root closure owns stepping and requests frames for continuity. The closure receives the live [Scheduler] each frame, whose held_keys / window_focused / mouse_* fields are the single polled hardware snapshot (GML keyboard_check / mouse_check_button parity).