add pygame test

This commit is contained in:
Dmitry Belyaev 2024-03-29 16:12:08 +03:00
parent 0bc9777bfb
commit 860f7bd0ad

View File

@ -0,0 +1,24 @@
import pygame
WIDTH = 1000
HEIGHT = 1000
def draw_background_image(screen, filename):
background = pygame.image.load(filename)
screen.blit(background, (0, 0))
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Тест Pygame")
draw_background_image(screen, "assets/bg1k.png")
pygame.display.flip()
while pygame.event.wait().type != pygame.QUIT:
...
pygame.quit()