mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 23:25:55 +03:00
Add SteamInput call to retrieve analog action glyphs and clarify documentation for retrieving both analog and digital glyphs using information from the official docs.
This commit is contained in:
parent
4e7e0ef8c4
commit
a0cb27f324
@ -55,6 +55,10 @@ public static IEnumerable<Controller> Controllers
|
|||||||
/// Return an absolute path to the PNG image glyph for the provided digital action name. The current
|
/// 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
|
/// action set in use for the controller will be used for the lookup. You should cache the result and
|
||||||
/// maintain your own list of loaded PNG assets.
|
/// maintain your own list of loaded PNG assets.
|
||||||
|
/// <para>
|
||||||
|
/// Valve recommends that you continuously check the action origins using <see cref="Controller.GetDigitalActionOrigins(string)"/>
|
||||||
|
/// in case the bindings have changed. When that happens you can update the prompts displayed in your game.
|
||||||
|
/// </para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="controller"></param>
|
/// <param name="controller"></param>
|
||||||
/// <param name="action"></param>
|
/// <param name="action"></param>
|
||||||
@ -74,6 +78,33 @@ ref origin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return an absolute path to the PNG image glyph for the provided analog action name. The current
|
||||||
|
/// action set in use for the controller will be used for the lookup. You should cache the result and
|
||||||
|
/// maintain your own list of loaded PNG assets.
|
||||||
|
/// <para>
|
||||||
|
/// Valve recommends that you continuously check the action origins using <see cref="Controller.GetAnalogActionOrigins(string)"/>
|
||||||
|
/// in case the bindings have changed. When that happens you can update the prompts displayed in your game.
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="controller"></param>
|
||||||
|
/// <param name="action"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetAnalogActionGlyph( Controller controller, string action )
|
||||||
|
{
|
||||||
|
InputActionOrigin origin = InputActionOrigin.None;
|
||||||
|
|
||||||
|
Internal.GetAnalogActionOrigins(
|
||||||
|
controller.Handle,
|
||||||
|
Internal.GetCurrentActionSet( controller.Handle ),
|
||||||
|
GetAnalogActionHandle( action ),
|
||||||
|
ref origin
|
||||||
|
);
|
||||||
|
|
||||||
|
return Internal.GetGlyphForActionOrigin_Legacy( origin );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return an absolute path to the PNG image glyph for the provided digital action name. The current
|
/// 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
|
/// action set in use for the controller will be used for the lookup. You should cache the result and
|
||||||
|
Loading…
Reference in New Issue
Block a user