Search
 
SCRIPT & CODE EXAMPLE
 

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")
Comment

PREVIOUS NEXT
Code Example
Python :: python read file line by line 
Python :: drop rows that contain null values in a pandas dataframe 
Python :: no module named torch 
Python :: who is a pythonista 
Python :: copy image from one folder to another in python 
Python :: list files in directory python with extension 
Python :: decimal places django template 
Python :: create a directory python 
Python :: how to separate year from datetime column in python 
Python :: sum number in a list python using recursion 
Python :: python schedule timezone 
Python :: filter dataframe columns vy a list of columns 
Python :: rename df column 
Python :: python time delay 
Python :: ValueError: numpy.ndarray size changed 
Python :: adding whitenoise to middleware in django 
Python :: python initialize multidimensional list 
Python :: python split string by tab 
Python :: how to plot graph using csv file in python 
Python :: save numpy arrayw with PIL 
Python :: correlation between lists python 
Python :: write a python program to read last n lines of a file 
Python :: comment dériver une classe python 
Python :: how to make a python exe 
Python :: keras import optimizer adam 
Python :: open website python 
Python :: delete element of a list from another list python 
Python :: how to create correlation heatmap in python 
Python :: how to read from a file into a list in python 
Python :: python sleep milliseconds 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =