judah ball
0
Q:

pygame get mouse position

x,y = pygame.mouse.get_pos()
#get the mouse cursor position
#get_pos() -> (x, y)
#Returns the X and Y position of the mouse cursor.
#The position is relative to the top-left corner of the display.
#The cursor position can be located outside of the display window,
#but is always constrained to the screen.
1
#mouse_press = pygame.mouse.get_pressed() returns True if any key is pressed
#mouse_pos = pygame.mouse.get_pos() returns True if the position of the mouse changes
0

New to Communities?

Join the community