Difference between revisions of "Mouse input"
(Created page with " <syntaxhighlight lang=python> if event.type == pygame.MOUSEBUTTONDOWN: if event.button == 1: # left click print("Left Click")...") |
(No difference)
|
Revision as of 16:38, 22 February 2018
if event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1: # left click
print("Left Click")
elif event.button == 3: # right click shrinks radius
print("Right Click")
if event.type == pygame.MOUSEMOTION:
# if mouse moved, get the position
print(event.pos)