BaseItem.input.on_button_down method

on_button_down(self, handler: Callable[[], None]) -> None:

Triggers whenever the main input is pressed down inside of this item.

Calling this function on an existing handler overwrites the handler.

Parameters

  • handler: Callable[[], None]

    function to call on press down. Pass null to remove the handler.