bro
This commit is contained in:
1 parent
de41a02749
commit
9af09cebd3
764 files changed
+54218
-78859
No files matched your search
@@ -10,7 +10,7 @@ def main():
|
||||
pygame.init()
|
||||
screen = pygame.display.set_mode((500, 500))
|
||||
screen.fill((255, 0, 0))
|
||||
s = pygame.Surface(screen.get_size(), pygame.SRCALPHA)
|
||||
s = pygame.Surface(screen.get_size(), pygame.SRCALPHA, 32)
|
||||
pygame.draw.line(s, (0, 0, 0), (250, 250), (250 + 200, 250))
|
||||
|
||||
width = 1
|
||||
@@ -23,23 +23,18 @@ def main():
|
||||
pygame.draw.circle(screen, "green", (50, 100), 10)
|
||||
pygame.draw.circle(screen, "black", (50, 100), 10, 1)
|
||||
|
||||
running = True
|
||||
|
||||
clock = pygame.Clock()
|
||||
|
||||
while running:
|
||||
clock.tick(10)
|
||||
|
||||
for event in pygame.event.get():
|
||||
pygame.display.flip()
|
||||
try:
|
||||
while True:
|
||||
event = pygame.event.wait()
|
||||
if event.type == pygame.QUIT:
|
||||
running = False
|
||||
elif event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_q:
|
||||
running = False
|
||||
|
||||
pygame.display.flip()
|
||||
|
||||
pygame.quit()
|
||||
break
|
||||
if event.type == pygame.KEYDOWN:
|
||||
if event.key == pygame.K_ESCAPE or event.unicode == "q":
|
||||
break
|
||||
pygame.display.flip()
|
||||
finally:
|
||||
pygame.quit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user