Examples for pygame.Mouse

pygame.mouse.get_pressed

Returns - Tuple (bool, bool, bool)

check which mouse button is being pressed

pygame.mouse.get_pos

Returns - Tuple (x, y)

gets the mouses x and y position

pygame.mouse.get_rel()

Returns - Tuple (x, y)

gets the mouses x and y relative movement since last function call

pygame.mouse.set_pos()

Returns - None

sets the mouse position to given arguments if mouse is visable.

pygame.mouse.set_visable()

Returns - Bool

if boolean is true, the cursor will be visable. Returns previous state.

pygame.mouse.set_cursor()

Returns - None

sets the mouse cursor to something new. This method accepts an explicit Cursor object.

pygame.mouse.get_cursor()

Returns - pygame.cursors.Cursor

get the information about the mouse system cursor