语法
参数
此方法没有参数。返回值
类型:GameInputLightingGroupsGameInputLightingGroups 标志的组合,对应于设备上至少包含一个灯的每个命名灯光组。如果设备在任何命名组中都没有灯,则返回 GameInputLightingGroupUnknown (0)。
备注
返回值中的每个标志都标识一个命名的灯组,例如GameInputLightingGroupFaceButtons 或 GameInputLightingGroupCenterLight,你可以使用 IGameInputDevice::SetLightingColor 对其进行寻址。该方法从不将 GameInputLightingGroupUnknown 报告为一个组,因为其值为 0。
设备可能具有不属于任何命名组的灯。因此,返回值为 0 并不总是意味着设备没有灯。若要确定设备是否支持灯光,请检查 IGameInputDevice::GetSupportedInput 是否包含 GameInputKindLighting,或者使用 GameInputLightingGroupAll 调用 IGameInputDevice::GetSupportedLightingGroupSize。若要统计不在命名组中的灯,请使用 GameInputLightingGroupUnknown 调用 GetSupportedLightingGroupSize。
以下示例在具有相应组的设备上将正面按钮设置为红色、将中央灯设置为蓝色,然后通过一次更新应用这些颜色。
灯光支持取决于设备和平台。目前,GameInput 支持 Windows 动态光效 (LampArray) 设备以及 DualSense 控制器灯条的灯光。
要求
头文件: GameInput.h 库: gameinput.lib 支持的平台: Windows、XBOX One 系列主机和 XBOX Series 主机另请参阅
GameInput 概述IGameInputDevice
GameInputLightingGroups
IGameInputDevice::GetSupportedLightingGroupSize
IGameInputDevice::SetLightingColor
IGameInputDevice::ApplyLightingColors
IGameInputDevice::ApplyLightingSystemDefault
