Skip to content

Instantly share code, notes, and snippets.

@shorinji
Last active September 17, 2021 09:53
Show Gist options
  • Save shorinji/39c895ef9fd4fd0c2ff76941ece7cbed to your computer and use it in GitHub Desktop.
Save shorinji/39c895ef9fd4fd0c2ff76941ece7cbed to your computer and use it in GitHub Desktop.
updated to work with current pygame
import pygame
import time
import sys
width = 800
height = 300
pygame.init()
win = pygame.display.set_mode((width, height))
fontName = pygame.font.get_default_font()
print("using font: %s" % fontName)
myFont = pygame.font.Font(fontName, 60, bold=True, italic=True)
label = myFont.render("READY PLAYER ONE", 1, (255, 255, 0), (0, 255, 0))
while True:
for e in pygame.event.get():
if e.type == pygame.QUIT or e.type == pygame.KEYDOWN:
sys.exit()
win.blit(label, (100, 100))
pygame.display.update()
@shorinji
Copy link
Author

Displays a line of text on the screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment