Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- WHITE = 0xffffff
- BLACK = 0x000000
- pygame.init()
- PDR = pygame.Rect(0, 0, 800, 600)
- PDS = pygame.display.set_mode(PDR.size)
- FONT = pygame.font.SysFont("arial", 10)
- surface = FONT.render("This is a test", False, WHITE)
- PDS.blit(surface, (0, 0))
- pygame.display.update()
- exit_demo = False
- while not exit_demo:
- for e in pygame.event.get():
- if e.type == pygame.KEYUP:
- if e.key == pygame.K_ESCAPE: exit_demo = True
Advertisement
Add Comment
Please, Sign In to add comment