C_GamePad
namespaceavailable in: camelotStatus in wowlua
25 functions: 0 implemented, 1 recorded, 24 guessed. 6 events, 1 of them fired by the emulator on its own.
Functions
| function | what it does | status |
|---|---|---|
AddSDLMapping | Adds an SDL controller mapping for a platform and returns whether it was added. · by wowlua(platform: ClientPlatformType, mapping: string): boolean | guessed |
ApplyConfigs | Applies the saved gamepad configurations. · by wowlua() | guessed |
AxisIndexToConfigName | Returns the configuration name of a gamepad axis, or nothing. · by wowlua(axisIndex: number): string? | guessed |
ButtonBindingToIndex | Converts the name of a keybinding to its assigned gamepad button index. Returns nil if no gamepad button is assigned to the requested keybinding.(bindingName: string): number? | guessed |
ButtonIndexToBinding | Returns the name of the keybinding assigned to a specified gamepad button index. Returns nil if no keybinding is assigned to the requested button.(buttonIndex: number): string? | guessed |
ButtonIndexToConfigName | Returns the configuration name of a gamepad button, or nothing. · by wowlua(buttonIndex: number): string? | guessed |
ClearLedColor | Resets the gamepad's LED color. · by wowlua() | guessed |
DeleteConfig | Deletes a gamepad configuration. · by wowlua(configID: GamePadConfigID) | guessed |
GetActiveDeviceID | Returns the ID of the active gamepad device. · by wowlua(): number | guessed |
GetAllConfigIDs | Returns the IDs of all gamepad configurations. · by wowlua(): GamePadConfigID[] | guessed |
GetAllDeviceIDs | Returns the IDs of all connected gamepad devices. · by wowlua(): number[] | guessed |
GetAllowHoverEventsWithFreeLook | Whether mouse hover events still fire while the gamepad's free look is active. · by wowlua(): boolean | guessed |
GetCombinedDeviceID | Returns the device ID that stands for all connected gamepads combined. · by wowlua(): number | guessed |
GetConfig | Returns a gamepad configuration, or nothing. · by wowlua(configID: GamePadConfigID): GamePadConfig? | guessed |
GetDeviceMappedState | Returns the state of a gamepad's buttons, axes and sticks after its mapping is applied. · by wowlua(deviceID: number?): GamePadMappedState? | recorded |
GetDeviceRawState | Returns the raw state of a gamepad's buttons, axes and sticks, before any mapping. · by wowlua(deviceID: number): GamePadRawState? | guessed |
GetLedColor | Returns the gamepad's LED color. · by wowlua(): ColorMixin | guessed |
GetPowerLevel | Returns a gamepad's battery level. · by wowlua(deviceID: number?): GamePadPowerLevel | guessed |
IsEnabled | Returns true if gamepad support is enabled on this system.(): boolean | guessed |
SetAllowHoverEventsWithFreeLook | Sets whether mouse hover events still fire while the gamepad's free look is active. · by wowlua(enable: boolean) | guessed |
SetConfig | Saves a gamepad configuration. · by wowlua(config: GamePadConfig) | guessed |
SetLedColor | Sets the gamepad's LED color. · by wowlua(color: ColorMixin) | guessed |
SetVibration | Makes the gamepad vibrate.(vibrationType: string, intensity: number) | guessed |
StickIndexToConfigName | Returns the configuration name of a gamepad stick, or nothing. · by wowlua(stickIndex: number): string? | guessed |
StopVibration | Stops the gamepad's vibration. · by wowlua() | guessed |
"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.
Events
| event | payload | fired by the emulator |
|---|---|---|
GAME_PAD_ACTIVE_CHANGED | isActive: boolean | not implemented |
GAME_PAD_ALLOW_HOVER_EVENTS_WITH_FREE_LOOK_CHANGED | enabled: boolean | not implemented |
GAME_PAD_CONFIGS_CHANGED | no payload | implemented |
GAME_PAD_CONNECTED | no payload | not implemented |
GAME_PAD_DISCONNECTED | no payload | not implemented |
GAME_PAD_POWER_CHANGED | powerLevel: GamePadPowerLevel | not implemented |
An event the emulator doesn't fire on its own can still be fired from a test: mock.fireEvent("GAME_PAD_ACTIVE_CHANGED").
Structures
GamePadAxisConfig· axis, shift?, scale?, deadzone?, buttonThreshold?, buttonPos?, buttonNeg?, comment?GamePadConfig· comment?, name?, configID, labelStyle?, rawButtonMappings, rawAxisMappings, axisConfigs, stickConfigsGamePadConfigID· vendorID?, productID?GamePadMappedState· name, labelStyle, buttonCount, axisCount, stickCount, buttons, axes, sticksGamePadRawAxisMapping· rawIndex, axis?, comment?GamePadRawButtonMapping· rawIndex, button?, axis?, axisValue?, comment?GamePadRawState· name, vendorID, productID, rawButtonCount, rawAxisCount, rawButtons, rawAxesGamePadStick· x, y, lenGamePadStickConfig· stick, axisX?, axisY?, deadzone?, deadzoneX?, deadzoneY?, comment?
sources
Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (GamePad system, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.