line drawn on screen
This commit is contained in:
parent
023ebd9432
commit
b246e05d79
@ -15,17 +15,19 @@ def main(windowed_mode):
|
|||||||
while running:
|
while running:
|
||||||
clock.tick(60)
|
clock.tick(60)
|
||||||
|
|
||||||
pygame.mouse.set_visible(False)
|
#pygame.mouse.set_visible(False)
|
||||||
|
|
||||||
for event in pygame.event.get():
|
for event in pygame.event.get():
|
||||||
if event.type == pygame.QUIT:
|
if event.type == pygame.QUIT:
|
||||||
running = False
|
running = False
|
||||||
if event.type == pygame.MOUSEBUTTONDOWN:
|
|
||||||
running = False
|
|
||||||
if event.type == pygame.KEYDOWN:
|
if event.type == pygame.KEYDOWN:
|
||||||
if event.key == pygame.K_ESCAPE:
|
if event.key == pygame.K_ESCAPE:
|
||||||
running = False
|
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.display.flip()
|
||||||
|
|
||||||
pygame.quit()
|
pygame.quit()
|
||||||
|
Loading…
Reference in New Issue
Block a user