v0.13.8

C_GamePad

namespaceavailable in: camelot

Status in wowlua

25 functions: 0 implemented, 1 recorded, 24 guessed. 6 events, 1 of them fired by the emulator on its own.

Functions

functionwhat it doesstatus
AddSDLMappingAdds an SDL controller mapping for a platform and returns whether it was added. · by wowlua
(platform: ClientPlatformType, mapping: string): boolean
guessed
ApplyConfigsApplies the saved gamepad configurations. · by wowlua
()
guessed
AxisIndexToConfigNameReturns the configuration name of a gamepad axis, or nothing. · by wowlua
(axisIndex: number): string?
guessed
ButtonBindingToIndexConverts 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
ButtonIndexToBindingReturns 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
ButtonIndexToConfigNameReturns the configuration name of a gamepad button, or nothing. · by wowlua
(buttonIndex: number): string?
guessed
ClearLedColorResets the gamepad's LED color. · by wowlua
()
guessed
DeleteConfigDeletes a gamepad configuration. · by wowlua
(configID: GamePadConfigID)
guessed
GetActiveDeviceIDReturns the ID of the active gamepad device. · by wowlua
(): number
guessed
GetAllConfigIDsReturns the IDs of all gamepad configurations. · by wowlua
(): GamePadConfigID[]
guessed
GetAllDeviceIDsReturns the IDs of all connected gamepad devices. · by wowlua
(): number[]
guessed
GetAllowHoverEventsWithFreeLookWhether mouse hover events still fire while the gamepad's free look is active. · by wowlua
(): boolean
guessed
GetCombinedDeviceIDReturns the device ID that stands for all connected gamepads combined. · by wowlua
(): number
guessed
GetConfigReturns a gamepad configuration, or nothing. · by wowlua
(configID: GamePadConfigID): GamePadConfig?
guessed
GetDeviceMappedStateReturns the state of a gamepad's buttons, axes and sticks after its mapping is applied. · by wowlua
(deviceID: number?): GamePadMappedState?
recorded
GetDeviceRawStateReturns the raw state of a gamepad's buttons, axes and sticks, before any mapping. · by wowlua
(deviceID: number): GamePadRawState?
guessed
GetLedColorReturns the gamepad's LED color. · by wowlua
(): ColorMixin
guessed
GetPowerLevelReturns a gamepad's battery level. · by wowlua
(deviceID: number?): GamePadPowerLevel
guessed
IsEnabledReturns true if gamepad support is enabled on this system.
(): boolean
guessed
SetAllowHoverEventsWithFreeLookSets whether mouse hover events still fire while the gamepad's free look is active. · by wowlua
(enable: boolean)
guessed
SetConfigSaves a gamepad configuration. · by wowlua
(config: GamePadConfig)
guessed
SetLedColorSets the gamepad's LED color. · by wowlua
(color: ColorMixin)
guessed
SetVibrationMakes the gamepad vibrate.
(vibrationType: string, intensity: number)
guessed
StickIndexToConfigNameReturns the configuration name of a gamepad stick, or nothing. · by wowlua
(stickIndex: number): string?
guessed
StopVibrationStops 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

eventpayloadfired by the emulator
GAME_PAD_ACTIVE_CHANGEDisActive: booleannot implemented
GAME_PAD_ALLOW_HOVER_EVENTS_WITH_FREE_LOOK_CHANGEDenabled: booleannot implemented
GAME_PAD_CONFIGS_CHANGEDno payloadimplemented
GAME_PAD_CONNECTEDno payloadnot implemented
GAME_PAD_DISCONNECTEDno payloadnot implemented
GAME_PAD_POWER_CHANGEDpowerLevel: GamePadPowerLevelnot 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, stickConfigs
  • GamePadConfigID · vendorID?, productID?
  • GamePadMappedState · name, labelStyle, buttonCount, axisCount, stickCount, buttons, axes, sticks
  • GamePadRawAxisMapping · rawIndex, axis?, comment?
  • GamePadRawButtonMapping · rawIndex, button?, axis?, axisValue?, comment?
  • GamePadRawState · name, vendorID, productID, rawButtonCount, rawAxisCount, rawButtons, rawAxes
  • GamePadStick · x, y, len
  • GamePadStickConfig · 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.