File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 2020# Check for updates
2121import requests
2222
23- version = "v1.1.4 "
23+ version = "v1.1.5 "
2424response = requests .get ("https://github.com/HyperSourceGithub/hyperair/releases/latest" )
2525latest_version = response .url .split ("/" ).pop ()
2626print (f"Using version { version } " )
@@ -191,6 +191,19 @@ def draw(self, surface):
191191 plane_index += 1
192192 plane_image = pygame .image .load (planes [plane_index ])
193193
194+ # Resize Checker
195+ elif event .type == pygame .VIDEORESIZE :
196+ # Get the rectangle of the plane image
197+ plane_rect = plane_image .get_rect ()
198+
199+ # Calculate the position of the plane to make it appear in the center of the screen
200+ plane_x = (screen .get_width () - plane_rect .width ) / 2
201+ plane_y = (screen .get_height () - plane_rect .height ) / 2
202+
203+ # Set the position of the plane
204+ plane_rect .topleft = (plane_x , plane_y )
205+ # ==========================================================================
206+
194207 # Get the state of all keyboard keys
195208 keys = pygame .key .get_pressed ()
196209
You can’t perform that action at this time.
0 commit comments