From 8a6c389e1f2fb6d9f053a511b8fe7e7b54ee7d47 Mon Sep 17 00:00:00 2001 From: Herman Groenenboom Date: Fri, 7 Apr 2023 10:56:00 +0200 Subject: [PATCH] Add documentation to Controller DigitalState and AnalogState to prevent confusiong between the Pressed and Active values --- Facepunch.Steamworks/Structs/Controller.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Facepunch.Steamworks/Structs/Controller.cs b/Facepunch.Steamworks/Structs/Controller.cs index 8acea94..67098c9 100644 --- a/Facepunch.Steamworks/Structs/Controller.cs +++ b/Facepunch.Steamworks/Structs/Controller.cs @@ -100,6 +100,9 @@ namespace Steamworks public float X; // x float public float Y; // y float internal byte BActive; // bActive byte + /// + /// Whether or not this action is currently available to be bound in the active action set. If it is not available, OR does not belong to the active action set, this will be false. + /// public bool Active => BActive != 0; } @@ -126,7 +129,13 @@ namespace Steamworks [MarshalAs( UnmanagedType.I1 )] internal byte BActive; // bActive byte + /// + /// The current state of this action; true if the action is currently pressed, otherwise false. + /// public bool Pressed => BState != 0; + /// + /// Whether or not this action is currently available to be bound in the active action set. + /// public bool Active => BActive != 0; } } \ No newline at end of file