Upload files to "/"
commit
f350c4467c
|
@ -0,0 +1,28 @@
|
|||
import pygame
|
||||
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE
|
||||
|
||||
pygame.init()
|
||||
|
||||
SCREEN_WIDTH=1000
|
||||
SCREEN_HEIGHT=1000
|
||||
|
||||
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
|
||||
|
||||
running = True
|
||||
|
||||
surf = pygame.Surface((50, 50))
|
||||
surf.fill((0, 255, 255))
|
||||
rect = surf.get_rect
|
||||
screen.blit(surf, (100, 100))
|
||||
pygame.display.flip()
|
||||
|
||||
while running:
|
||||
for event in pygame.event.get():
|
||||
if event.type == KEYDOWN:
|
||||
if event.key == K_ESCAPE:
|
||||
running = False
|
||||
|
||||
if event.type == QUIT:
|
||||
running = False
|
||||
|
||||
pygame.quit()
|
Loading…
Reference in New Issue