mirror of
https://github.com/bevyengine/bevy.git
synced 2026-07-06 02:23:17 -04:00
4d74baf1ae
This renames the concept of `BufferedEvent` to `Message`, and updates our APIs, comments, and documentation to refer to these types as "messages" instead of "events". It also removes/updates anything that considers messages to be "observable", "listenable", or "triggerable". This is a followup to https://github.com/bevyengine/bevy/pull/20731, which omitted the `BufferedEvent -> Message` rename for brevity. See that post for rationale.
17 lines
427 B
Rust
17 lines
427 B
Rust
//! An example that shows how to handle drag and drop of files in an app.
|
|
|
|
use bevy::prelude::*;
|
|
|
|
fn main() {
|
|
App::new()
|
|
.add_plugins(DefaultPlugins)
|
|
.add_systems(Update, file_drag_and_drop_system)
|
|
.run();
|
|
}
|
|
|
|
fn file_drag_and_drop_system(mut drag_and_drop_reader: MessageReader<FileDragAndDrop>) {
|
|
for drag_and_drop in drag_and_drop_reader.read() {
|
|
info!("{:?}", drag_and_drop);
|
|
}
|
|
}
|