PyGame Logo
PyGame
Documentation
||  Home  ||  Help Contents  ||
 
|| CD || Channel || Font || Joystick || Rect ||
|| Sound || Surface || pygame || cdrom || display ||
|| event || font || image || joystick || key ||
|| mixer || mouse || music || surfarray || time ||

pygame.mouse

Contains routines for dealing with the mouse.
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_pos - moves the cursor position
set_visible - show or hide the mouse cursor

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_pos
pygame.mouse.set_pos(pos) -> None
 
set_visible
pygame.mouse.set_visible(bool) -> bool