freya::launch

Function launch_cfg

Source
pub fn launch_cfg(config: LaunchConfig<'_>)
Expand description

Launch a new window with a custom config. You can use a builder if you wish.

ยงExample


fn main() {
    launch_cfg(
        LaunchConfig::new()
            .with_window(WindowConfig::new(app)
                .with_size(700.0, 500.0)
                .with_decorations(true)
                .with_transparency(false)
                .with_title("Freya App")
                .with_background("rgb(150, 100, 200)"))
    );
}

fn app() -> Element {
   rsx!(
        rect {
            width: "100%",
            height: "100%",
            label {
                "Hello World!"
            }
        }
    )
}