📜  如何在 pygame 中添加鼠标按钮 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:24.826000             🧑  作者: Mango

代码示例2
pygame.mouse.get_pos() #-> get the mouse cursor position on the screen in taple
#-> (x, y)

if event.type == pygame.MOUSEBUTTONDOWN:
    print(event.button)

#------------------------#
1 - left click
2 - middle click
3 - right click
4 - scroll up
5 - scroll down
#------------------------#