panda3d.core.MouseButton

class MouseButton

This class is just used as a convenient namespace for grouping all of these handy functions that return buttons which map to standard mouse buttons.

Inheritance diagram

Inheritance diagram of MouseButton

__init__() → None
__init__(param0: MouseButton) → None
static button(button_number: int) → ButtonHandle

Returns the ButtonHandle associated with the particular numbered mouse button (zero-based), if there is one, or ButtonHandle.none() if there is not.

Return type

ButtonHandle

static one() → ButtonHandle

Returns the ButtonHandle associated with the first mouse button.

Return type

ButtonHandle

static two() → ButtonHandle

Returns the ButtonHandle associated with the second mouse button.

Return type

ButtonHandle

static three() → ButtonHandle

Returns the ButtonHandle associated with the third mouse button.

Return type

ButtonHandle

static four() → ButtonHandle

Returns the ButtonHandle associated with the fourth mouse button.

Return type

ButtonHandle

static five() → ButtonHandle

Returns the ButtonHandle associated with the fifth mouse button.

Return type

ButtonHandle

static wheelUp() → ButtonHandle

Returns the ButtonHandle generated when the mouse wheel is rolled one notch upwards.

Return type

ButtonHandle

static wheelDown() → ButtonHandle

Returns the ButtonHandle generated when the mouse wheel is rolled one notch downwards.

Return type

ButtonHandle

static wheelLeft() → ButtonHandle

Returns the ButtonHandle generated when the mouse is scrolled to the left. Usually, you’ll only find the horizontal scroll on laptops.

Return type

ButtonHandle

static wheelRight() → ButtonHandle

Returns the ButtonHandle generated when the mouse is scrolled to the right. Usually, you’ll only find the horizontal scroll on laptops.

Return type

ButtonHandle

static isMouseButton(button: ButtonHandle) → bool

Returns true if the indicated ButtonHandle is a mouse button, false if it is some other kind of button.