bevy_streamdeck

Crates.iobevy_streamdeck
lib.rsbevy_streamdeck
version
sourcesrc
created_at2022-07-30 16:17:15.031927
updated_at2024-11-30 14:30:17.618364
descriptionElgato Stream Deck plugin for Bevy
homepagehttps://github.com/vleue/bevy_streamdeck
repositoryhttps://github.com/vleue/bevy_streamdeck
max_upload_size
id635613
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
publish (github:vleue:publish)

documentation

https://docs.rs/bevy_streamdeck

README

Bevy Stream Deck

MIT/Apache 2.0 Doc Crate Bevy Tracking CI

This is a plugin for integrating the Elgato Stream Deck with the Bevy game engine. It allows you to handle input events from the Stream Deck and control its display.

capture of a Stream Deck

Getting Started

Adding the Plugin

app.add_plugin(StreamDeckPlugin);

Handling Input Events

Receive events from button presses (see inputs example):

fn print_streamdeck_events(mut streamdeck_input_events: EventReader<StreamDeckInput>) {
    for event in streamdeck_input_events.iter() {
        info!("{:?}", event);
    }
}

Setting Button Colors

Set a button color (see colors example):

fn set_color(streamdeck: Res<StreamDeck>) {
    streamdeck.set_key_color(1, Color::BLUE);
}

Displaying Images

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);
    }
}

Platform-Specific Setup

Linux

For Linux setup, please refer to the rust-streamdeck getting started guide.

Compatibility

Bevy Compatibility

Bevy bevy_streamdeck
0.15 0.5
0.14 0.4
0.13 0.3
0.9 0.2
0.8 0.1
Commit count: 60

cargo fmt