2022-05-16 13:53:20 +00:00
|
|
|
//! An example that shows how to handle drag and drop of files in an app.
|
|
|
|
|
2021-01-01 21:31:22 +00:00
|
|
|
use bevy::prelude::*;
|
|
|
|
|
|
|
|
fn main() {
|
2021-07-27 20:21:06 +00:00
|
|
|
App::new()
|
2021-01-01 21:31:22 +00:00
|
|
|
.add_plugins(DefaultPlugins)
|
2023-03-18 01:45:34 +00:00
|
|
|
.add_systems(Update, file_drag_and_drop_system)
|
2021-01-01 21:31:22 +00:00
|
|
|
.run();
|
|
|
|
}
|
|
|
|
|
2021-01-19 06:23:30 +00:00
|
|
|
fn file_drag_and_drop_system(mut events: EventReader<FileDragAndDrop>) {
|
2023-08-30 14:20:03 +00:00
|
|
|
for event in events.read() {
|
2021-04-22 23:30:48 +00:00
|
|
|
info!("{:?}", event);
|
2021-01-01 21:31:22 +00:00
|
|
|
}
|
|
|
|
}
|