OneLauncher-Cracked/packages/oneclient_app/examples/min_freya.rs
Julian Chang 29d1f1c9d2
Bugs
Fixed #492
Fixed #510
Fixed #506
Fixed #568
Fixed #582
Fixed #578
Fixed #567
Fixed #588
Fixed #585
Fixed #571
Fixed #587
Fixed #584
2026-07-15 13:41:43 -04:00

29 lines
676 B
Rust

use freya::prelude::*;
struct MinApp;
impl App for MinApp {
fn render(&self) -> impl IntoElement {
rect()
.width(Size::fill())
.height(Size::fill())
.child(label().text("hello"))
}
}
fn main() {
let cache_mb = std::env::var("ONECLIENT_GPU_CACHE_MB")
.ok()
.and_then(|v| v.parse::<usize>().ok())
.unwrap_or(128);
let config = LaunchConfig::new()
.with_window(
WindowConfig::new_app(MinApp)
.with_title("min_freya")
.with_size(1200., 800.),
)
.with_gpu_resource_cache_limit(cache_mb * 1024 * 1024);
launch(config);
}