Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 937 Bytes

egui drag-and-drop.md

File metadata and controls

20 lines (18 loc) · 937 Bytes

Relies on winit which may not work under wayland: emilk/egui#4105

let native_options = eframe::NativeOptions {
        viewport: egui::ViewportBuilder::default()
            .with_drag_and_drop(true) <-------------------
            ...etc

The following is similar to the egui example. The egui example would be preferable to follow.

// Capture the files dropped this frame
if !&ctx.input(|i| i.raw.dropped_files.is_empty()) {
    println!("File dropped");
};