Problem - I'm trying to make a start menu for a simon says game and trying to first display some text however nothing displays other than the game screen turning white (which should happen). I've looked at a similar questions and they don't seem to help.
The program should just display 'Simon says' in black writing on the screen
code:
import pygame,random,pickle,time
WHITE = (255,255,255)
BLACK = (0,0,0)
RED = (255,0,0)
GREEN = (0,255,0)
BLUE = (0,0,255)
YELLOW = (255,255,0)
PURPLE = (128,0,128)
CYAN = (0,255,255)
ORANGE = (255,165,0)
PINK = (255,192,203)
pygame.init()
logo = pygame.image.load("logo.png")
pygame.display.set_icon(logo)
pygame.display.set_caption("Simon Says")
screen = pygame.display.set_mode((1280,720))
def textObjects(text,font):
textSurface = font.render(text,True,BLACK)
return textSurface, textSurface.get_rect()
def displayText(text):
fontInfo = pygame.font.Font(None,100)
textSurf, textSize = textObjects(text,fontInfo)
textSize.center = ((1280/2),(720/2))
screen.blit(textSurf,textSize)
pygame.display.update()
def startMenu():
displayText('Simon Says')
def main():
startMenu()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill(WHITE)
pygame.display.update()
pygame.display.flip()
main()
Also tried using pygame.display.flip() and that didn't work eithter