INNER CODE UNIT · Rust

Ok

wkwan/flo · src/egui_integration.rs:121

    if let Ok(window) = windows.single() {
        // Get the scale factor from the window and store it in the resource
        let scale_factor = window.scale_factor();
        egui_ctx.scale_factor = scale_factor;
        
        let raw_input = &mut egui_ctx.raw_input;
        
        
        // Update screen rect using physical dimensions to fill the entire window
        raw_input.screen_rect = Some(egui::Rect::from_min_size(
            egui::Pos2::ZERO,
            egui::vec2(window.physical_width() as f32, window.physical_height() as f32),
        ));
        
        // Update time
        raw_input.time = Some(time.elapsed_secs_f64());
        
        // Track cursor position for button events

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…