bevy/examples/app/drag_and_drop.rs
Dimitri Belopopsky a01f22e0c5
Add basic file drag and drop support (#1096)
Add basic file drag and drop support
2021-01-01 15:31:22 -06:00

18 lines
374 B
Rust

use bevy::prelude::*;
fn main() {
App::build()
.add_plugins(DefaultPlugins)
.add_system(file_drag_and_drop_system.system())
.run();
}
fn file_drag_and_drop_system(
mut reader: Local<EventReader<FileDragAndDrop>>,
events: Res<Events<FileDragAndDrop>>,
) {
for event in reader.iter(&events) {
println!("{:?}", event);
}
}