1

I've look for the docs, many video on YouTube, questions on stackoverflow but I still can't fix it.This is my code:

import pygame
pygame.init()
run = True
#color def
BK = (0, 0, 0)
WT = (255, 255, 255)
GY = (127, 127, 127)
#create screen
screen = pygame.display.set_mode((800,600))
#title, icon
pygame.display.set_caption("Clock")
icon = pygame.image.load("clock.png")
pygame.display.set_icon(icon)
#loop
while run:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False
pygame.draw.circle(screen, WT, (0, 0), 175, width=1)
kingking
  • 23
  • 5
  • Is this your entire code? If so, you probably forgot to add `pygame.display.flip()` to update the screen –  Nov 03 '20 at 08:08
  • "cant fix it" does not give a very good description of what it does do that you're not expecting – Sayse Nov 03 '20 at 08:08

1 Answers1

0

You missed to update the display by by either pygame.display.update() or pygame.display.flip(). And you need to draw circle in the application loop. Care about the Indentation:

while run:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False
   
    #-->|  INDENTATION

    # clear display
    screen.fill(0)

    # draw scene (circle)
    pygame.draw.circle(screen, WT, (0, 0), 175, width=1)

    # update display
    pygame.display.flip()
Rabbid76
  • 202,892
  • 27
  • 131
  • 174