Confused at why PyGame display's a black screen

前端 未结 2 934
花落未央
花落未央 2021-01-15 21:08

So before I decided to ask this question I did a little research to see what my problem was and came across this: Code Only Produces Black Screen In Pygame Window However th

2条回答
  •  情深已故
    2021-01-15 21:15

    Ok so I have now solved my problem. (aha novice error). So in the __init__(self) area within class Pane() I added the line self.Screen.fill((white)) to make it look like this:

        def __init__(self):
            self.Screen = pygame.display.set_mode((1000,600), 0, 32)
            self.font = pygame.font.SysFont('Arial', 25)
            self.Screen.fill((white))
    

    I'm not sure if this is the best way to solve the problem but it works. So that's good. However if you think that this isn't a good way to solve the problem then by all means teach me of a better way to solve my problem.

提交回复
热议问题