hide cursor

This commit is contained in:
LorrensP-2158466
2025-04-05 19:39:59 +02:00
parent 1328caab5c
commit e71e840d9f
3 changed files with 54 additions and 25 deletions

22
src/bevy_plugin.rs Normal file
View 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()
}),
);
}