|
|
|
|
@ -48,7 +48,7 @@ fn main() {
|
|
|
|
|
}),
|
|
|
|
|
..default()
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
).add_systems(Update, handle_window.run_if(just_pressed(KeyCode::F11)));
|
|
|
|
|
|
|
|
|
|
app.add_plugins(credits::CreditsPlugin);
|
|
|
|
|
app.add_plugins(debug::DebugPlugin);
|
|
|
|
|
@ -185,3 +185,17 @@ where
|
|
|
|
|
{
|
|
|
|
|
Box::new(move |buttons: Res<ButtonInput<T>>| -> bool { buttons.pressed(button) })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn handle_window(
|
|
|
|
|
mut query: Query<&mut Window>
|
|
|
|
|
) {
|
|
|
|
|
use bevy::window::WindowMode;
|
|
|
|
|
|
|
|
|
|
query.iter_mut().for_each(|mut window| {
|
|
|
|
|
window.mode = match window.mode {
|
|
|
|
|
WindowMode::BorderlessFullscreen => WindowMode::Windowed,
|
|
|
|
|
_ => WindowMode::BorderlessFullscreen,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|