0

As stated in the title I can't seem to get .fill to work.


test_surface = pygame.Surface((100,200))
test_surface.fill((255,255,255))

pygame.display.update()
clock.tick(60)

run = True

while run:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
                 run = False  
         

I tried moving the test surface inputs into the loop right before the "for event in pygame.event.get()" and it didn't work. still stuck with a black screen. I also tried using the actual color instead of the value ex "Red" but that still didn't work.

I also tried changing the bottom half of the code to try and get it to work.

 
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:  
            pygame.quit()    
            exit()  

It still didn't work and was stuck with a black screen. I also tried to move the test surface inputs right under the " while true: " as I thought if they were in the loop it would change something but it didn't. Any help is greatly apricated.

Jonas Z.
  • 17
  • 5

0 Answers0