|
|
|
@ -127,7 +127,7 @@ fn interactive_button(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn scale_ui(
|
|
|
|
fn scale_ui(
|
|
|
|
mut windows: Query<&mut Window>,
|
|
|
|
windows: Query<&Window>,
|
|
|
|
mut ui_scale: ResMut<UiScale>,
|
|
|
|
mut ui_scale: ResMut<UiScale>,
|
|
|
|
tweakfile: Res<tweak::GameTweaks>,
|
|
|
|
tweakfile: Res<tweak::GameTweaks>,
|
|
|
|
tweaks: Res<Assets<tweak::Tweaks>>,
|
|
|
|
tweaks: Res<Assets<tweak::Tweaks>>,
|
|
|
|
@ -139,10 +139,7 @@ fn scale_ui(
|
|
|
|
let width = tweak.get::<f32>("resolution_x").unwrap();
|
|
|
|
let width = tweak.get::<f32>("resolution_x").unwrap();
|
|
|
|
let height = tweak.get::<f32>("resolution_y").unwrap();
|
|
|
|
let height = tweak.get::<f32>("resolution_y").unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
windows.iter_mut().for_each(|mut w| {
|
|
|
|
windows.iter().for_each(|w| {
|
|
|
|
// Setting window resolution at startup
|
|
|
|
|
|
|
|
w.resolution.set(width, height);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Check if window is minimized
|
|
|
|
// Check if window is minimized
|
|
|
|
if w.resolution.height() > 0.0 && w.resolution.height() > 0.0 {
|
|
|
|
if w.resolution.height() > 0.0 && w.resolution.height() > 0.0 {
|
|
|
|
// Setting UI Scale based on ratio of expected to current ratio
|
|
|
|
// Setting UI Scale based on ratio of expected to current ratio
|
|
|
|
|