INNER CODE UNIT · Rust

setup_bevy_app_with_window

wkwan/flo · src/lib.rs:39

pub fn setup_bevy_app_with_window(width: f32, height: f32, title: &str) -> App {
    std::env::set_var("RUST_BACKTRACE", "0");

    let mut app = App::new();
    app
        .add_event::<KeyboardFocusLost>()
        .add_plugins((
            MinimalPlugins,
            AssetPlugin::default(),
            WindowPlugin {
                primary_window: Some(Window {
                    title: title.to_string(),
                    resolution: (width, height).into(),
                    ..default()
                }),
                ..default()
            },
            AccessibilityPlugin,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…