From 99c4798bed5f3aed79ffa4633d20612fd84e32c6 Mon Sep 17 00:00:00 2001 From: Alula <6276139+alula@users.noreply.github.com> Date: Sat, 12 Feb 2022 09:19:12 +0100 Subject: [PATCH] switch: use 427px image for upper part --- src/components/background.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/background.rs b/src/components/background.rs index 529d9a9..2f9d82d 100644 --- a/src/components/background.rs +++ b/src/components/background.rs @@ -134,8 +134,11 @@ impl Background { ); } } - - batch.add_rect((state.canvas_size.0 - 320.0) / 2.0, offset_y, &Rect::new_size(0, 0, 320, 88)); + if !state.constants.is_switch { + batch.add_rect((state.canvas_size.0 - 320.0) / 2.0, offset_y, &Rect::new_size(0, 0, 320, 88)); + } else { + batch.add_rect((state.canvas_size.0 - 427.0) / 2.0, offset_y, &Rect::new_size(0, 0, 427, 88)); + } for x in ((-offset_x / 2)..(state.canvas_size.0 as i32)).step_by(320) { batch.add_rect(x as f32, offset_y + 88.0, &Rect::new_size(0, 88, 320, 35));