0
def save0():
    darker_white = (0,255,0)

    screen.fill(green)

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                leave()
            if event.type == pygame.VIDEORESIZE:
                surface = pygame.display.set_mode((event.w, event.h),pygame.RESIZABLE)

        #screen.fill(white)
        #screen.fill(darker_white)
        print("Loop is true")
        pygame.display.update()

So whenever i run this function in my pygame window it seems like it is refreshing the screen but i am trying to change the colour to white and it just stays black for some reason it seems to update because when i resize the window the whit lines disapear and the whole screen turns black. If anyone can help me fix this code please do I am trying to create a animation where the screen gets darker. Thanks

26099
  • 91
  • 7
  • What's your display surface? `screen`? Then what is `surface`? – sloth Aug 08 '18 at 06:11
  • I'm voting to close this question because: "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example." – skrx Aug 08 '18 at 10:54

0 Answers0