Files
bevy/examples/input/touch_input_events.rs
Carter Anderson 4d74baf1ae BufferedEvent -> Message Rename (#20953)
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.
2025-09-10 21:04:15 +00:00

17 lines
366 B
Rust

//! Prints out all touch inputs.
use bevy::{input::touch::*, prelude::*};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Update, touch_event_system)
.run();
}
fn touch_event_system(mut touch_inputs: MessageReader<TouchInput>) {
for touch_input in touch_inputs.read() {
info!("{:?}", touch_input);
}
}