import ByteArray from "../utils/ByteArray"; import GameInputControl from "./GameInputControl"; import Vector from "../Vector"; declare namespace openfl.ui { export class GameInputDevice { protected constructor(id: string, name: string); /** * Specifies the maximum size for the buffer used to cache sampled control values. * If `startCachingSamples` returns samples that require more memory than you specify, * it throws a memory error. * */ static readonly MAX_BUFFER_SIZE = 32000; /** * Enables or disables this device. * */ enabled: boolean; /** * Returns the ID of this device. * */ id: string; /** * Returns the name of this device. * */ name: string; /** * Returns the number of controls on this device. * */ get numControls(): number; /** * Specifies the rate (in milliseconds) at which to retrieve control values. * */ sampleInterval: number; /** * Writes cached sample values to the ByteArray. * @param data * @param append * @return * */ getCachedSamples(data: ByteArray, append?: boolean): number; /** * Retrieves a specific control from a device. * @param i * @return * */ getControlAt(i: number): GameInputControl; /** * Requests this device to start keeping a cache of sampled values. * @param numSamples * @param controls * */ startCachingSamples(numSamples: number, controls: Vector): void; /** * Stops sample caching. * */ stopCachingSamples(): void; } } export default openfl.ui.GameInputDevice;