line drawn on screen

This commit is contained in:
Nicholas Dyer 2023-02-19 16:25:55 -05:00
parent 023ebd9432
commit b246e05d79
No known key found for this signature in database
GPG Key ID: E4E6388793FA2105

View File

@ -15,17 +15,19 @@ def main(windowed_mode):
while running:
clock.tick(60)
pygame.mouse.set_visible(False)
#pygame.mouse.set_visible(False)
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.MOUSEBUTTONDOWN:
running = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
running = False
mouse_pos = pygame.mouse.get_pos()
window.fill((0, 0, 0))
pygame.draw.line(window, (255, 255, 255), (720/2, 720/2), mouse_pos, 15)
pygame.display.flip()
pygame.quit()