#bevy #window #indicator #progress #icons #taskbar #management

bevy_window_management

A library for managing window icon and taskbar progress indicator in Bevy

1 unstable release

0.1.2 Feb 11, 2024
0.1.1 Feb 10, 2024
0.1.0 Feb 10, 2024

#1003 in Game dev

Download history 5/week @ 2024-02-07 13/week @ 2024-02-14 31/week @ 2024-02-21 18/week @ 2024-02-28 4/week @ 2024-03-06 7/week @ 2024-03-13 26/week @ 2024-03-27 31/week @ 2024-04-03

57 downloads per month

MIT license

6KB
74 lines

Bevy Window Management

A simple crate that allows you to set the window icon and taskbar progress indicator (currently only on windows).

Currently it is only compatible with Bevy 0.11.3

Modyfing taskbar progress indicator is only supported on windows and requires the taskbar feature

Example usage:

use bevy::{
    app::{App, Startup, Update},
    asset::AssetServer,
    ecs::system::{Res, ResMut},
    DefaultPlugins,
};
use bevy_window_management::{WindowManagement, WindowManagementPlugin};

fn main() {
    let mut app = App::new();
    app.add_plugins((WindowManagementPlugin, DefaultPlugins))
        .add_systems(
            Startup,
            |assets: Res<AssetServer>, mut window: ResMut<WindowManagement>| {
                window.window_icon = Some(assets.load("my_icon.png"));
            },
        )
        .add_systems(Update, |mut window: ResMut<WindowManagement>| {
            window.taskbar_progress =
                window
                    .taskbar_progress
                    .as_ref()
                    .map(|p| bevy_window_management::TaskbarProgress {
                        progress: p.progress + 1,
                        max: 100,
                    });
        });
    app.run();
}

Dependencies

~19–36MB
~545K SLoC