Left Click Callback

property Window.left_click_callback: callable

Callback executed when the left mouse button is clicked.

The callback function receives a bool representing if the mouse button was pressed.

def left_click_callback(pressed: bool) -> None:
    # code here
Raises
  • TypeError – callback must be callable

  • ValueError – callback function must take 1 argument

Return type

callable