Skip to content

Commit 6449ce5

Browse files
authored
Fix minimap example window resize (#2544)
1 parent 56e4c96 commit 6449ce5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arcade/examples/minimap_texture.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
WINDOW_WIDTH = 1280
1818
WINDOW_HEIGHT = 720
19+
ASPECT_RATIO = WINDOW_WIDTH / WINDOW_HEIGHT
1920
WINDOW_TITLE = "Minimap Example"
2021

2122
# How many pixels to keep as a minimum margin between the character
@@ -203,8 +204,8 @@ def on_resize(self, width: int, height: int):
203204
Handle the user grabbing the edge and resizing the window.
204205
"""
205206
super().on_resize(width, height)
206-
self.camera_sprites.match_window()
207-
self.camera_gui.match_window()
207+
self.camera_sprites.match_window(aspect=ASPECT_RATIO, projection=False)
208+
self.camera_gui.match_window(aspect=ASPECT_RATIO, projection=False)
208209

209210

210211
def main():

0 commit comments

Comments
 (0)