Add a responsive scaling for ui #73

Merged
raphael merged 11 commits from change-scaling into main 2024-03-09 17:24:22 +00:00
Showing only changes of commit f0671e12e2 - Show all commits

View file

@ -21,6 +21,7 @@ pub enum CurrentScene {
} }
/// Calculates the ui_scale.0 depending on the size of the main node /// Calculates the ui_scale.0 depending on the size of the main node
/// in order to make the screen responsive
pub fn change_scaling(mut ui_scale: ResMut<UiScale>, window: Query<&Window>) { pub fn change_scaling(mut ui_scale: ResMut<UiScale>, window: Query<&Window>) {
let window = window.single(); let window = window.single();
let (a, b) = ( let (a, b) = (