WowAddons

World of Warcraft Forever API · C_GamePad.md, for your AI

C_GamePad

25 functions, 6 events, 9 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_GamePad.AddSDLMapping

success = C_GamePad.AddSDLMapping(platform, mapping)

Arguments

platformClientPlatformType
mappingcstring

Returns

successbool

C_GamePad.ApplyConfigs

C_GamePad.ApplyConfigs()

C_GamePad.AxisIndexToConfigName

configName = C_GamePad.AxisIndexToConfigName(axisIndex)

Arguments

axisIndexnumber

Returns

configNamecstring may be nil

C_GamePad.ButtonBindingToIndex

buttonIndex = C_GamePad.ButtonBindingToIndex(bindingName)

Arguments

bindingNamecstring

Returns

buttonIndexnumber may be nil

C_GamePad.ButtonIndexToBinding

bindingName = C_GamePad.ButtonIndexToBinding(buttonIndex)

Arguments

buttonIndexnumber

Returns

bindingNamecstring may be nil

C_GamePad.ButtonIndexToConfigName

configName = C_GamePad.ButtonIndexToConfigName(buttonIndex)

Arguments

buttonIndexnumber

Returns

configNamecstring may be nil

C_GamePad.ClearLedColor

C_GamePad.ClearLedColor()

C_GamePad.DeleteConfig

C_GamePad.DeleteConfig(configID)

Arguments

configIDGamePadConfigID

C_GamePad.GetActiveDeviceID

deviceID = C_GamePad.GetActiveDeviceID()

Returns

deviceIDnumber

C_GamePad.GetAllConfigIDs

configIDs = C_GamePad.GetAllConfigIDs()

Returns

configIDsGamePadConfigID[]

C_GamePad.GetAllDeviceIDs

deviceIDs = C_GamePad.GetAllDeviceIDs()

Returns

deviceIDsnumber[]

C_GamePad.GetAllowHoverEventsWithFreeLook

enabled = C_GamePad.GetAllowHoverEventsWithFreeLook()

Returns

enabledbool

C_GamePad.GetCombinedDeviceID

deviceID = C_GamePad.GetCombinedDeviceID()

Returns

deviceIDnumber

C_GamePad.GetConfig

config = C_GamePad.GetConfig(configID)

Arguments

configIDGamePadConfigID

Returns

configGamePadConfig may be nil

C_GamePad.GetDeviceMappedState

state = C_GamePad.GetDeviceMappedState([deviceID])

Arguments

deviceIDnumber may be nil

Returns

stateGamePadMappedState may be nil

C_GamePad.GetDeviceRawState

rawState = C_GamePad.GetDeviceRawState(deviceID)

Arguments

deviceIDnumber

Returns

rawStateGamePadRawState may be nil

C_GamePad.GetLedColor

color = C_GamePad.GetLedColor()

Returns

colorcolorRGB

C_GamePad.GetPowerLevel

powerLevel = C_GamePad.GetPowerLevel([deviceID])

Arguments

deviceIDnumber may be nil

Returns

powerLevelGamePadPowerLevel

C_GamePad.IsEnabled

enabled = C_GamePad.IsEnabled()

Returns

enabledbool

C_GamePad.SetAllowHoverEventsWithFreeLook

C_GamePad.SetAllowHoverEventsWithFreeLook(enable)

Arguments

enablebool

C_GamePad.SetConfig

C_GamePad.SetConfig(config)

Arguments

configGamePadConfig

C_GamePad.SetLedColor

C_GamePad.SetLedColor(color)

Arguments

colorcolorRGB

C_GamePad.SetVibration

C_GamePad.SetVibration(vibrationType, intensity)

Arguments

vibrationTypecstring
intensitynumber

C_GamePad.StickIndexToConfigName

configName = C_GamePad.StickIndexToConfigName(stickIndex)

Arguments

stickIndexnumber

Returns

configNamecstring may be nil

C_GamePad.StopVibration

C_GamePad.StopVibration()

Events

GAME_PAD_ACTIVE_CHANGED

isActivebool

GAME_PAD_ALLOW_HOVER_EVENTS_WITH_FREE_LOOK_CHANGED

enabledbool

GAME_PAD_CONFIGS_CHANGED

No payload.

GAME_PAD_CONNECTED

No payload.

GAME_PAD_DISCONNECTED

No payload.

GAME_PAD_POWER_CHANGED

powerLevelGamePadPowerLevel

Tables

GamePadAxisConfig structure

axisstring
shiftnumber may be nil
scalenumber may be nil
deadzonenumber may be nil
buttonThresholdnumber may be nil
buttonPosstring may be nil
buttonNegstring may be nil
commentstring may be nil

GamePadConfig structure

commentstring may be nil
namestring may be nil
configIDGamePadConfigID
labelStylestring may be nil
rawButtonMappingsGamePadRawButtonMapping[]
rawAxisMappingsGamePadRawAxisMapping[]
axisConfigsGamePadAxisConfig[]
stickConfigsGamePadStickConfig[]

GamePadConfigID structure

vendorIDnumber may be nil
productIDnumber may be nil

GamePadMappedState structure

namestring
labelStylestring
buttonCountnumber
axisCountnumber
stickCountnumber
buttonsbool[]
axesnumber[]
sticksGamePadStick[]

GamePadRawAxisMapping structure

rawIndexnumber
axisstring may be nil
commentstring may be nil

GamePadRawButtonMapping structure

rawIndexnumber
buttonstring may be nil
axisstring may be nil
axisValuenumber may be nil
commentstring may be nil

GamePadRawState structure

namestring
vendorIDnumber
productIDnumber
rawButtonCountnumber
rawAxisCountnumber
rawButtonsbool[]
rawAxesnumber[]

GamePadStick structure

xnumber
ynumber
lennumber

GamePadStickConfig structure

stickstring
axisXstring may be nil
axisYstring may be nil
deadzonenumber may be nil
deadzoneXnumber may be nil
deadzoneYnumber may be nil
commentstring may be nil

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows