Last active
September 17, 2021 09:53
-
-
Save shorinji/39c895ef9fd4fd0c2ff76941ece7cbed to your computer and use it in GitHub Desktop.
updated to work with current pygame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Displays a line of text on the screen