From d1896f49cb658419e16fab7601d8f3276d6713ba Mon Sep 17 00:00:00 2001 From: Jeremy Metz Date: Sun, 29 Dec 2024 17:03:00 +0100 Subject: [PATCH] feat: Updated minimal bevy app to 0.15 --- templates/apps/bevy-demo/src/lib.rs.hbs | 1 - templates/apps/bevy/src/lib.rs.hbs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/apps/bevy-demo/src/lib.rs.hbs b/templates/apps/bevy-demo/src/lib.rs.hbs index adadca1e..f0673abd 100644 --- a/templates/apps/bevy-demo/src/lib.rs.hbs +++ b/templates/apps/bevy-demo/src/lib.rs.hbs @@ -1,4 +1,3 @@ - use bevy::window::{WindowMode, MonitorSelection}; use bevy::{color::palettes::css::PURPLE, prelude::*}; use winit::event_loop::EventLoop; diff --git a/templates/apps/bevy/src/lib.rs.hbs b/templates/apps/bevy/src/lib.rs.hbs index 2893363a..8d561190 100644 --- a/templates/apps/bevy/src/lib.rs.hbs +++ b/templates/apps/bevy/src/lib.rs.hbs @@ -1,4 +1,4 @@ -use bevy::window::WindowMode; +use bevy::window::{WindowMode, MonitorSelection}; use bevy::prelude::*; #[bevy_main] @@ -8,7 +8,7 @@ fn main() { primary_window: Some(Window { name: Some("{{app.stylized-name}}".to_string()), resizable: false, - mode: WindowMode::BorderlessFullscreen, + mode: WindowMode::BorderlessFullscreen(MonitorSelection::Primary), ..default() }), ..default() @@ -23,5 +23,5 @@ fn setup( ) { let texture_handle = asset_server.load("branding/icon.png"); commands.spawn(Camera2dBundle::default()); - commands.spawn(SpriteBundle {texture: texture_handle, ..Default::default()}); + commands.spawn(Sprite {image: texture_handle, ..Default::default()}); }