generated from tipragot/rust
This commit is contained in:
parent
3264e06388
commit
1275c9e24c
|
@ -28,6 +28,9 @@ pub fn change_scaling(
|
|||
windows: Query<&Window>,
|
||||
size: Res<UILayoutSize>,
|
||||
) {
|
||||
if !windows.get_single().unwrap().resolution.physical_height() > 0 {
|
||||
return;
|
||||
};
|
||||
let window = windows.get_single().expect("Main window not found");
|
||||
let (a, b) = (
|
||||
window.resolution.width() / size.0.x,
|
||||
|
|
|
@ -10,9 +10,8 @@ pub struct MenuPlugin;
|
|||
impl Plugin for MenuPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(OnEnter(CurrentScene::Menu), menu_ui);
|
||||
// app.add_systems(Update, change_scaling);
|
||||
// app.add_systems(Update, hover_system);
|
||||
// app.add_systems(Update, pressed_system);
|
||||
app.add_systems(Update, hover_system);
|
||||
app.add_systems(Update, pressed_system);
|
||||
app.add_systems(OnExit(CurrentScene::Menu), destroy_menu);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue