From ad073f46a9853d7bed43de13dfd09477dcc87f95 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sun, 2 Feb 2025 02:10:26 +0100 Subject: [PATCH] Fix minimap example window resize --- arcade/examples/minimap_texture.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arcade/examples/minimap_texture.py b/arcade/examples/minimap_texture.py index 4837d303e..a817617af 100644 --- a/arcade/examples/minimap_texture.py +++ b/arcade/examples/minimap_texture.py @@ -16,6 +16,7 @@ WINDOW_WIDTH = 1280 WINDOW_HEIGHT = 720 +ASPECT_RATIO = WINDOW_WIDTH / WINDOW_HEIGHT WINDOW_TITLE = "Minimap Example" # How many pixels to keep as a minimum margin between the character @@ -203,8 +204,8 @@ def on_resize(self, width: int, height: int): Handle the user grabbing the edge and resizing the window. """ super().on_resize(width, height) - self.camera_sprites.match_window() - self.camera_gui.match_window() + self.camera_sprites.match_window(aspect=ASPECT_RATIO, projection=False) + self.camera_gui.match_window(aspect=ASPECT_RATIO, projection=False) def main():