Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/examples/app/drag_and_drop.rs
6849 views
1
//! An example that shows how to handle drag and drop of files in an app.
2
3
use bevy::prelude::*;
4
5
fn main() {
6
App::new()
7
.add_plugins(DefaultPlugins)
8
.add_systems(Update, file_drag_and_drop_system)
9
.run();
10
}
11
12
fn file_drag_and_drop_system(mut drag_and_drop_reader: MessageReader<FileDragAndDrop>) {
13
for drag_and_drop in drag_and_drop_reader.read() {
14
info!("{:?}", drag_and_drop);
15
}
16
}
17
18