forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//! Shows how to display a window in transparent mode. | ||
//! | ||
//! This feature works as expected depending on the platform. Please check the | ||
//! [documentation](https://docs.rs/bevy/latest/bevy/prelude/struct.WindowDescriptor.html#structfield.transparent) | ||
//! for more details. | ||
|
||
use bevy::prelude::*; | ||
|
||
fn main() { | ||
App::new() | ||
.add_startup_system(setup) | ||
.add_plugins(DefaultPlugins.set(WindowPlugin { | ||
window: WindowDescriptor { | ||
// Set always_on_top to force the window to stay on top of other windows. | ||
always_on_top: true, | ||
..default() | ||
}, | ||
..default() | ||
})) | ||
.run(); | ||
} | ||
|
||
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) { | ||
commands.spawn(Camera2dBundle::default()); | ||
commands.spawn(SpriteBundle { | ||
texture: asset_server.load("branding/icon.png"), | ||
..default() | ||
}); | ||
} |