#bevy-plugin #streamdeck #deck #bevy #events

bevy_streamdeck

Elgato Stream Deck plugin for Bevy

12 unstable releases (4 breaking)

0.5.0 Nov 30, 2024
0.5.0-rc.1 Nov 15, 2024
0.4.0 Jul 4, 2024
0.4.0-rc.4 Jun 29, 2024
0.1.2 Jul 31, 2022

#1918 in Game dev

Download history 54/week @ 2024-12-04 52/week @ 2024-12-11 48/week @ 2024-12-18 32/week @ 2024-12-25 29/week @ 2025-01-01 29/week @ 2025-01-08 37/week @ 2025-01-15 31/week @ 2025-01-22 44/week @ 2025-01-29 63/week @ 2025-02-05 42/week @ 2025-02-12 73/week @ 2025-02-19 71/week @ 2025-02-26 38/week @ 2025-03-05 46/week @ 2025-03-12 31/week @ 2025-03-19

195 downloads per month

MIT/Apache

330KB
284 lines

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

Dependencies

~48–80MB
~1.5M SLoC