pygame   documentation
||  Home  ||  Help Contents  ||
 
|| pygame || cdrom || constants || cursor || display || draw ||
|| event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || sndarray || surfarray || time ||
|| transform ||
 
|| CD || Channel || Clock || Font || Joystick || Movie ||
|| Overlay || Rect || Sound || Surface ||
 
|| color || cursors || sprite ||

pygame.mouse

Contains routines for dealing with the mouse. All mouse events are retrieved through the pygame.event module. The mouse module can be used to get the current state of the mouse. It can also be used to set the state of the system cursor.
 
If you hide the mouse cursor with pygame.mouse.set_visible(0) and lock the mouse focus to your game with pygame.event.set_grab(1), the hidden mouse will be forced to the center of the screen. This will help your relative mouse motions keep from getting stuck on the edges of the screen.
get_cursor - get mouse cursor data
get_focused - state of mouse input focus
get_pos - gets the cursor position
get_pressed - state of the mouse buttons
get_rel - gets the movement of the mouse
set_cursor - state of shape of the mouse cursor
set_pos - moves the cursor position
set_visible - show or hide the mouse cursor

get_cursor
pygame.mouse.get_cursor() -> size, hotspot, xormasks, andmasks
 
get_focused
pygame.mouse.get_focused() -> bool
 
get_pos
pygame.mouse.get_pos() -> x, y
 
get_pressed
pygame.mouse.get_pressed() -> button1, button2, button3
 
get_rel
pygame.mouse.get_rel() -> x, y
 
set_cursor
pygame.mouse.set_cursor(size, hotspot, xormasks, andmasks) -> None
 
set_pos
pygame.mouse.set_pos(pos) -> None
 
set_visible
pygame.mouse.set_visible(bool) -> bool