Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
Steamworks.SteamController Class Reference

Static Public Member Functions

static void ActivateActionSet (ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle)
 
static ControllerActionSetHandle_t GetActionSetHandle (string pszActionSetName)
 
static ControllerAnalogActionData_t GetAnalogActionData (ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle)
 
static
ControllerAnalogActionHandle_t 
GetAnalogActionHandle (string pszActionName)
 
static int GetAnalogActionOrigins (ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, EControllerActionOrigin[] originsOut)
 
static int GetConnectedControllers (ControllerHandle_t[] handlesOut)
 
static ControllerHandle_t GetControllerForGamepadIndex (int nIndex)
 
static ControllerActionSetHandle_t GetCurrentActionSet (ControllerHandle_t controllerHandle)
 
static
ControllerDigitalActionData_t 
GetDigitalActionData (ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle)
 
static
ControllerDigitalActionHandle_t 
GetDigitalActionHandle (string pszActionName)
 
static int GetDigitalActionOrigins (ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, EControllerActionOrigin[] originsOut)
 
static int GetGamepadIndexForController (ControllerHandle_t ulControllerHandle)
 
static string GetGlyphForActionOrigin (EControllerActionOrigin eOrigin)
 
static ControllerMotionData_t GetMotionData (ControllerHandle_t controllerHandle)
 
static string GetStringForActionOrigin (EControllerActionOrigin eOrigin)
 
static bool Init ()
 
static void RunFrame ()
 
static void SetLEDColor (ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags)
 
static bool ShowAnalogActionOrigins (ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle, float flScale, float flXPosition, float flYPosition)
 
static bool ShowBindingPanel (ControllerHandle_t controllerHandle)
 
static bool ShowDigitalActionOrigins (ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle, float flScale, float flXPosition, float flYPosition)
 
static bool Shutdown ()
 
static void StopAnalogActionMomentum (ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction)
 
static void TriggerHapticPulse (ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec)
 
static void TriggerRepeatedHapticPulse (ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags)
 
static void TriggerVibration (ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed)
 

Member Function Documentation

static void Steamworks.SteamController.ActivateActionSet ( ControllerHandle_t  controllerHandle,
ControllerActionSetHandle_t  actionSetHandle 
)
inlinestatic

Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')

This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in

your state loops, instead of trying to place it in all of your state transitions.

static ControllerActionSetHandle_t Steamworks.SteamController.GetActionSetHandle ( string  pszActionSetName)
inlinestatic

ACTION SETS

Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.

static ControllerAnalogActionData_t Steamworks.SteamController.GetAnalogActionData ( ControllerHandle_t  controllerHandle,
ControllerAnalogActionHandle_t  analogActionHandle 
)
inlinestatic

Returns the current state of these supplied analog game action

static ControllerAnalogActionHandle_t Steamworks.SteamController.GetAnalogActionHandle ( string  pszActionName)
inlinestatic

Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.

static int Steamworks.SteamController.GetAnalogActionOrigins ( ControllerHandle_t  controllerHandle,
ControllerActionSetHandle_t  actionSetHandle,
ControllerAnalogActionHandle_t  analogActionHandle,
EControllerActionOrigin[]  originsOut 
)
inlinestatic

Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.

originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles

static int Steamworks.SteamController.GetConnectedControllers ( ControllerHandle_t[]  handlesOut)
inlinestatic

Enumerate currently connected controllers

handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles

Returns the number of handles written to handlesOut

static ControllerHandle_t Steamworks.SteamController.GetControllerForGamepadIndex ( int  nIndex)
inlinestatic

Returns the associated controller handle for the specified emulated gamepad

static ControllerActionSetHandle_t Steamworks.SteamController.GetCurrentActionSet ( ControllerHandle_t  controllerHandle)
inlinestatic
static ControllerDigitalActionData_t Steamworks.SteamController.GetDigitalActionData ( ControllerHandle_t  controllerHandle,
ControllerDigitalActionHandle_t  digitalActionHandle 
)
inlinestatic

Returns the current state of the supplied digital game action

static ControllerDigitalActionHandle_t Steamworks.SteamController.GetDigitalActionHandle ( string  pszActionName)
inlinestatic

ACTIONS

Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.

static int Steamworks.SteamController.GetDigitalActionOrigins ( ControllerHandle_t  controllerHandle,
ControllerActionSetHandle_t  actionSetHandle,
ControllerDigitalActionHandle_t  digitalActionHandle,
EControllerActionOrigin[]  originsOut 
)
inlinestatic

Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.

originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles

static int Steamworks.SteamController.GetGamepadIndexForController ( ControllerHandle_t  ulControllerHandle)
inlinestatic

Returns the associated gamepad index for the specified controller, if emulating a gamepad

static string Steamworks.SteamController.GetGlyphForActionOrigin ( EControllerActionOrigin  eOrigin)
inlinestatic

Get a local path to art for on-screen glyph for a particular origin

static ControllerMotionData_t Steamworks.SteamController.GetMotionData ( ControllerHandle_t  controllerHandle)
inlinestatic

Returns raw motion data from the specified controller

static string Steamworks.SteamController.GetStringForActionOrigin ( EControllerActionOrigin  eOrigin)
inlinestatic

Returns a localized string (from Steam's language setting) for the specified origin

static bool Steamworks.SteamController.Init ( )
inlinestatic

Init and Shutdown must be called when starting/ending use of this interface

static void Steamworks.SteamController.RunFrame ( )
inlinestatic

Synchronize API state with the latest Steam Controller inputs available. This

is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest

possible latency, you call this directly before reading controller state.

static void Steamworks.SteamController.SetLEDColor ( ControllerHandle_t  controllerHandle,
byte  nColorR,
byte  nColorG,
byte  nColorB,
uint  nFlags 
)
inlinestatic

Set the controller LED color on supported controllers.

static bool Steamworks.SteamController.ShowAnalogActionOrigins ( ControllerHandle_t  controllerHandle,
ControllerAnalogActionHandle_t  analogActionHandle,
float  flScale,
float  flXPosition,
float  flYPosition 
)
inlinestatic
static bool Steamworks.SteamController.ShowBindingPanel ( ControllerHandle_t  controllerHandle)
inlinestatic

Invokes the Steam overlay and brings up the binding screen

Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode

static bool Steamworks.SteamController.ShowDigitalActionOrigins ( ControllerHandle_t  controllerHandle,
ControllerDigitalActionHandle_t  digitalActionHandle,
float  flScale,
float  flXPosition,
float  flYPosition 
)
inlinestatic

Attempt to display origins of given action in the controller HUD, for the currently active action set

Returns false is overlay is disabled / unavailable, or the user is not in Big Picture mode

static bool Steamworks.SteamController.Shutdown ( )
inlinestatic
static void Steamworks.SteamController.StopAnalogActionMomentum ( ControllerHandle_t  controllerHandle,
ControllerAnalogActionHandle_t  eAction 
)
inlinestatic
static void Steamworks.SteamController.TriggerHapticPulse ( ControllerHandle_t  controllerHandle,
ESteamControllerPad  eTargetPad,
ushort  usDurationMicroSec 
)
inlinestatic

Trigger a haptic pulse on a controller

static void Steamworks.SteamController.TriggerRepeatedHapticPulse ( ControllerHandle_t  controllerHandle,
ESteamControllerPad  eTargetPad,
ushort  usDurationMicroSec,
ushort  usOffMicroSec,
ushort  unRepeat,
uint  nFlags 
)
inlinestatic

Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times.

nFlags is currently unused and reserved for future use.

static void Steamworks.SteamController.TriggerVibration ( ControllerHandle_t  controllerHandle,
ushort  usLeftSpeed,
ushort  usRightSpeed 
)
inlinestatic

Tigger a vibration event on supported controllers.


The documentation for this class was generated from the following file: