It's exactly what the title is.
Is there a way to distinguish left-click or right-click in Pygame?
if event.type == MOUSEBUTTONDOWN:
If you use MOUSEBUTTONDOWN or MOUSEBUTTONUP like this, Turning the mouse wheel is also recognized by clicking, making it possible to make a wide circle. How do you distinguish left-click from right-click?
python pygame
I searched for you instead:
According to the link above...
if event.type == pygame.MOUSEBUTTONDOWN:
print(event.button)
Separate by the value of event.button
:
© 2024 OneMinuteCode. All rights reserved.