Crates.io | bevy_streamdeck |
lib.rs | bevy_streamdeck |
version | 0.4.0 |
source | src |
created_at | 2022-07-30 16:17:15.031927 |
updated_at | 2024-07-04 19:29:19.253937 |
description | Elgato Stream Deck plugin for Bevy |
homepage | https://github.com/vleue/bevy_streamdeck |
repository | https://github.com/vleue/bevy_streamdeck |
max_upload_size | |
id | 635613 |
size | 432,500 |
Elgato Stream Deck plugin for Bevy.
Add the plugin:
app.add_plugin(StreamDeckPlugin);
Receive events from button press (see inputs example):
fn print_streamdeck_events(mut streamdeck_input_events: EventReader<StreamDeckInput>) {
for event in streamdeck_input_events.iter() {
info!("{:?}", event);
}
}
Receive events from button press (see inputs example):
fn print_streamdeck_events(mut streamdeck_input_events: EventReader<StreamDeckInput>) {
for event in streamdeck_input_events.iter() {
info!("{:?}", event);
}
}
Set a button color (see colors example)
fn set_color(streamdeck: Res<StreamDeck>) {
streamdeck.set_key_color(1, Color::BLUE);
}
Display an image on a button (see image example)
fn set_image(streamdeck: Res<StreamDeck>, logo: Res<Logo>, images: Res<Assets<Image>>) {
let handle: Handle<Image> = ...;
if let Some(image) = images.get(&handle) {
streamdeck.set_key_image(1, &image);
}
}
see https://github.com/ryankurte/rust-streamdeck#getting-started
Bevy | bevy_streamdeck |
---|---|
0.14 | 0.4 |
0.13 | 0.3 |
0.9 | 0.2 |
0.8 | 0.1 |