Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check if left mousebuttondown in pygame

for event in pygame.event.get():
	if event.type == pygame.MOUSEBUTTONDOWN:
    	if event.button == 1: #Left Mouse Button
        	print("Left Mouse Button Down")
       	elif event.button == 2: #Scroll Wheel Button
        	print("Scroll Wheel Button Down")
        elif event.button == 3: #Right Mouse Button
        	print("Right Mouse Button Down")
 
PREVIOUS NEXT
Tagged: #check #left #mousebuttondown #pygame
ADD COMMENT
Topic
Name
5+4 =