2022-01-14 06:05:51 +00:00
|
|
|
use bevy::{
|
|
|
|
ecs::schedule::StageLabel,
|
|
|
|
prelude::{ResMut, SystemLabel, Windows},
|
|
|
|
};
|
2022-01-12 08:18:13 +00:00
|
|
|
|
2022-01-14 06:05:51 +00:00
|
|
|
pub mod action;
|
2022-01-12 08:18:13 +00:00
|
|
|
pub mod camera;
|
|
|
|
pub mod geometry;
|
2022-01-14 06:05:51 +00:00
|
|
|
pub mod glamor;
|
2022-01-12 08:18:13 +00:00
|
|
|
pub mod input;
|
|
|
|
pub mod lights;
|
|
|
|
pub mod ui;
|
|
|
|
|
2022-01-14 06:05:51 +00:00
|
|
|
#[derive(Clone, Debug, Hash, PartialEq, Eq, SystemLabel, StageLabel)]
|
|
|
|
pub enum Label {
|
|
|
|
Geometry,
|
|
|
|
Glamor,
|
|
|
|
Input,
|
|
|
|
Action,
|
|
|
|
}
|
|
|
|
|
2022-01-12 08:18:13 +00:00
|
|
|
pub fn disable_mouse_trap(mut windows: ResMut<Windows>) {
|
|
|
|
let window = windows.get_primary_mut().unwrap();
|
|
|
|
window.set_cursor_lock_mode(false);
|
|
|
|
window.set_cursor_visibility(true);
|
|
|
|
}
|