import { Component } from '../component'; import { ContextManager } from '../context'; import { Event } from '../event'; import { Observable } from '../observable'; export interface GamepadButtonEvent { button: number; gamepad: number; pressed: boolean; touched: boolean; value: number; } /** * Manages gamepad interactions, facilitating the tracking and handling of button press events for a specific controller. * * It offers a comprehensive set of events for individual gamepad buttons, allowing for detailed and responsive input handling in a gaming context. * @zcomponent * @zicon sports_esports */ export declare class Gamepad extends Component { /** @zprop */ readonly onButtonDown: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonUp: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonSouth: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonWest: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonNorth: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonEast: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonShoulderLeft: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonShoulderRight: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonTriggerLeft: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonTriggerRight: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonDLeft: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonDRight: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonDUp: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonDDown: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonSelect: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonStart: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonCenter: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonStickLeft: Event<[GamepadButtonEvent]>; /** @zprop */ readonly onButtonStickRight: Event<[GamepadButtonEvent]>; private _indexMapping; /** * @zprop */ readonly controllerIndex: Observable; /** * @zprop * @zdefault 0.1 */ readonly analogPressedThreshold: Observable; private _downLastFrame; /** * Creates a new Gamepad component. * @param contextManager - The current ContextManager * @param props - The constructor properties. */ constructor(contextManager: ContextManager, props: any); private _updateRegistration; private _update; }