1x,y = pygame.mouse.get_pos()
2#get the mouse cursor position
3#get_pos() -> (x, y)
4#Returns the X and Y position of the mouse cursor.
5#The position is relative to the top-left corner of the display.
6#The cursor position can be located outside of the display window,
7#but is always constrained to the screen.
1 pygame.mouse.get_pos()
2 get the mouse cursor position
3 get_pos() -> (x, y)
4
5 Returns the x and y position of the mouse cursor.
6 The position is relative to the top-left corner of the display.
7 The cursor position can be located outside of the display window,
8 but is always constrained to the screen.