Add overloads of Get...ActionOrigins() with an action set argument

This commit is contained in:
David Tootill 2024-08-23 12:09:38 -07:00
parent 6152e81168
commit 90528d01a0

View File

@ -88,7 +88,7 @@ ref origin
/// <summary>
/// Return an array of all origins mapped to the provided analog action
/// Return an array of all origins mapped to the provided analog action in the current action set
/// </summary>
/// <returns></returns>
public static InputActionOrigin[] GetAnalogActionOrigins( Controller controller, string action )
@ -105,6 +105,24 @@ ref origins[0]
}
/// <summary>
/// Return an array of all origins mapped to the provided analog action in the specified action set
/// </summary>
/// <returns></returns>
public static InputActionOrigin[] GetAnalogActionOrigins( Controller controller, string actionSet, string action )
{
InputActionOrigin[] origins = new InputActionOrigin[STEAM_INPUT_MAX_ORIGINS];
Internal.GetAnalogActionOrigins(
controller.Handle,
Internal.GetActionSetHandle(actionSet),
GetAnalogActionHandle( action ),
ref origins[0]
);
return origins;
}
/// <summary>
/// Return an absolute path to the PNG image glyph for the provided digital action name. The current
/// action set in use for the controller will be used for the lookup. You should cache the result and
@ -130,7 +148,7 @@ ref origin
/// <summary>
/// Return an array of all origins mapped to the provided digital action
/// Return an array of all origins mapped to the provided digital action in the current action set
/// </summary>
/// <returns></returns>
public static InputActionOrigin[] GetDigitalActionOrigins( Controller controller, string action )
@ -147,6 +165,24 @@ ref origins[0]
}
/// <summary>
/// Return an array of all origins mapped to the provided action set and digital action
/// </summary>
/// <returns></returns>
public static InputActionOrigin[] GetDigitalActionOrigins( Controller controller, string actionSet, string action )
{
InputActionOrigin[] origins = new InputActionOrigin[STEAM_INPUT_MAX_ORIGINS];
Internal.GetDigitalActionOrigins(
controller.Handle,
Internal.GetActionSetHandle( actionSet ),
GetDigitalActionHandle( action ),
ref origins[0]
);
return origins;
}
/// <summary>
/// Return an absolute path to the PNG image glyph for the provided digital action name. The current
/// action set in use for the controller will be used for the lookup. You should cache the result and