Controller¶
Controller¶
[Controller] implementation for [Input] handler.
Controller.default_action_binds¶
ClassVar
Trigger¶
Limit¶
Limit.POSITIVE¶
Limit.NEGATIVE¶
__init__¶
def __init__(
axis: Controller.Axis,
limit: Controller.Trigger.Limit | None = None,
deadzone: Positive[Percent] = 10,
) -> None
__init__¶
def __init__(
action_binds: Controller.ActionBinds | None = None,
device_id: Controller.DeviceID | None = None,
) -> None
capture_states¶
Capture all action state.
If instantiated with handler = Controller[MyAction](),
then MyAction will be available at runtime.
Therefore, by calling this method,
all actions are ensured they map correctly from an action variant to its state.
NOTE Requires pygame.event.pump to be called before capture_states.