hide cursor
This commit is contained in:
22
src/bevy_plugin.rs
Normal file
22
src/bevy_plugin.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use bevy::{prelude::*, window::CursorOptions};
|
||||
|
||||
/// Overrides the default Bevy plugins and configures things like the screen settings.
|
||||
pub(super) fn plugin(app: &mut App) {
|
||||
app.add_plugins(
|
||||
DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Window {
|
||||
title: "Among Me".into(),
|
||||
// This will spawn an invisible window
|
||||
// The window will be made visible in the make_visible() system after 3 frames.
|
||||
// This is useful when you want to avoid the white window that shows up before the GPU is ready to render the app.
|
||||
cursor_options: CursorOptions {
|
||||
visible: false,
|
||||
..default()
|
||||
},
|
||||
..default()
|
||||
}
|
||||
.into(),
|
||||
..default()
|
||||
}),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user