added the missing file
This commit is contained in:
parent
c862972f80
commit
5a47c69425
1 changed files with 22 additions and 0 deletions
22
src/console.rs
Normal file
22
src/console.rs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
// this seems to crash
|
||||||
|
|
||||||
|
pub fn toggle_fullscreeen(
|
||||||
|
input: Res<Input<KeyCode>>,
|
||||||
|
mut windows: ResMut<Windows>,
|
||||||
|
) {
|
||||||
|
let window = windows
|
||||||
|
.get_primary_mut()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
if input.pressed(KeyCode::F) /*&& input.just_pressed(KeyCode::Return) */ {
|
||||||
|
if window.mode() == WindowMode::Windowed {
|
||||||
|
window.set_mode(WindowMode::Fullscreen);
|
||||||
|
} else {
|
||||||
|
window.set_mode(WindowMode::Windowed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue