pygame,如何检测右键点击,只有pygame.MOUSEBUTTONDOWN 检测鼠标点击,无法判断左键还是右键
mouse_press = pygame.mouse.get_press() # mouse_press对象存储一个列表分别为左键、中键、右键
mouse_press[2]就是右键
AttributeError: module 'pygame.mouse' has no attribute 'get_press'
mouse_press = pygame.mouse.get_press() # mouse_press对象存储一个列表分别为左键、中键、右键
mouse_press[2]就是右键
引用来自“hellshan”的评论
mouse_press = pygame.mouse.get_press() # mouse_press对象存储一个列表分别为左键、中键、右键
mouse_press[2]就是右键
AttributeError: module 'pygame.mouse' has no attribute 'get_press'
引用来自“hellshan”的评论
mouse_press = pygame.mouse.get_press() # mouse_press对象存储一个列表分别为左键、中键、右键
mouse_press[2]就是右键
AttributeError: module 'pygame.mouse' has no attribute 'get_press'