panda3d.core.ButtonRegistry

from panda3d.core import ButtonRegistry
class ButtonRegistry

The ButtonRegistry class maintains all the assigned ButtonHandles in a given system. There should be only one ButtonRegistry class during the lifetime of the application.

Inheritance diagram

Inheritance diagram of ButtonRegistry

__init__(param0: ButtonRegistry) → None
getButton(name: str) → ButtonHandle

Finds a ButtonHandle in the registry matching the indicated name. If there is no such ButtonHandle, registers a new one and returns it.

Return type

ButtonHandle

findButton(name: str) → ButtonHandle

Finds a ButtonHandle in the registry matching the indicated name. If there is no such ButtonHandle, returns ButtonHandle.none().

Return type

ButtonHandle

findAsciiButton(ascii_equivalent: char) → ButtonHandle

Finds a ButtonHandle in the registry matching the indicated ASCII equivalent character. If there is no such ButtonHandle, returns ButtonHandle.none().

Return type

ButtonHandle

write(out: ostream) → None
static ptr() → ButtonRegistry

Returns the pointer to the global ButtonRegistry object.

Return type

ButtonRegistry