From b056a50e73c8744a23c899d9c6840a88babbd46c Mon Sep 17 00:00:00 2001 From: thefiddler Date: Thu, 2 Jan 2014 01:33:08 +0100 Subject: [PATCH] [Input] Added xml documentation for GamePadCapabilities --- Source/OpenTK/Input/GamePadCapabilities.cs | 170 ++++++++++++++++++++- 1 file changed, 164 insertions(+), 6 deletions(-) diff --git a/Source/OpenTK/Input/GamePadCapabilities.cs b/Source/OpenTK/Input/GamePadCapabilities.cs index 7fbe8055..269081e8 100644 --- a/Source/OpenTK/Input/GamePadCapabilities.cs +++ b/Source/OpenTK/Input/GamePadCapabilities.cs @@ -31,7 +31,9 @@ using System; namespace OpenTK.Input { - + /// + /// Describes the capabilities of a GamePad input device. + /// public struct GamePadCapabilities : IEquatable { Buttons buttons; @@ -54,146 +56,285 @@ namespace OpenTK.Input #region Public Members + /// + /// Gets a value describing the type of a input device. + /// This value depends on the connected device and the drivers in use. If IsConnected + /// is false, then this value will be GamePadType.Unknown. + /// + /// The GamePadType of the connected input device. public GamePadType GamePadType { get { return (GamePadType)gamepad_type; } } + /// + /// Gets a value describing whether this GamePad has + /// an up digital pad button. + /// + /// true if this instance has an up digital pad button; otherwise, false. public bool HasDPadUpButton { get { return (buttons & Buttons.DPadUp) != 0; } } - public bool HasDPadLeftButton - { - get { return (buttons & Buttons.DPadLeft) != 0; } - } - + /// + /// Gets a value describing whether this GamePad has + /// a down digital pad button. + /// + /// true if this instance has a down digital pad button; otherwise, false. public bool HasDPadDownButton { get { return (buttons & Buttons.DPadDown) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left digital pad button. + /// + /// true if this instance has a left digital pad button; otherwise, false. + public bool HasDPadLeftButton + { + get { return (buttons & Buttons.DPadLeft) != 0; } + } + + /// + /// Gets a value describing whether this GamePad has + /// a right digital pad button. + /// + /// true if this instance has a right digital pad button; otherwise, false. public bool HasDPadRightButton { get { return (buttons & Buttons.DPadRight) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// an A button. + /// + /// true if this instance has an A button; otherwise, false. public bool HasAButton { get { return (buttons & Buttons.A) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a B button. + /// + /// true if this instance has a B button; otherwise, false. public bool HasBButton { get { return (buttons & Buttons.B) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a X button. + /// + /// true if this instance has a X button; otherwise, false. public bool HasXButton { get { return (buttons & Buttons.X) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a Y button. + /// + /// true if this instance has a Y button; otherwise, false. public bool HasYButton { get { return (buttons & Buttons.Y) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left stick button. + /// + /// true if this instance has a left stick button; otherwise, false. public bool HasLeftStickButton { get { return (buttons & Buttons.LeftStick) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a right stick button. + /// + /// true if this instance has a right stick button; otherwise, false. public bool HasRightStickButton { get { return (buttons & Buttons.RightStick) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left shoulder button. + /// + /// true if this instance has a left shoulder button; otherwise, false. public bool HasLeftShoulderButton { get { return (buttons & Buttons.LeftShoulder) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a right shoulder button. + /// + /// true if this instance has a right shoulder button; otherwise, false. public bool HasRightShoulderButton { get { return (buttons & Buttons.RightShoulder) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a back button. + /// + /// true if this instance has a back button; otherwise, false. public bool HasBackButton { get { return (buttons & Buttons.Back) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a big button. (also known as "guide" or "home" button). + /// + /// true if this instance has a big button; otherwise, false. public bool HasBigButton { get { return (buttons & Buttons.BigButton) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a start button. + /// + /// true if this instance has a start button; otherwise, false. public bool HasStartButton { get { return (buttons & Buttons.Start) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left thumbstick with a x-axis. + /// + /// true if this instance has a left thumbstick with a x-axis; otherwise, false. public bool HasLeftXThumbStick { get { return (axes & GamePadAxes.LeftX) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left thumbstick with a y-axis. + /// + /// true if this instance has a left thumbstick with a y-axis; otherwise, false. public bool HasLeftYThumbStick { get { return (axes & GamePadAxes.LeftY) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a right thumbstick with a x-axis. + /// + /// true if this instance has a right thumbstick with a x-axis; otherwise, false. public bool HasRightXThumbStick { get { return (axes & GamePadAxes.RightX) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a right thumbstick with a y-axis. + /// + /// true if this instance has a right thumbstick with a y-axis; otherwise, false. public bool HasRightYThumbStick { get { return (axes & GamePadAxes.RightY) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a left trigger. + /// + /// true if this instance has a left trigger; otherwise, false. public bool HasLeftTrigger { get { return (axes & GamePadAxes.LeftTrigger) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a right trigger. + /// + /// true if this instance has a right trigger; otherwise, false. public bool HasRightTrigger { get { return (axes & GamePadAxes.RightTrigger) != 0; } } + /// + /// Gets a value describing whether this GamePad has + /// a low-frequency vibration motor. + /// + /// true if this instance has a low-frequency vibration motor; otherwise, false. public bool HasLeftVibrationMotor { get { return false; } } + /// + /// Gets a value describing whether this GamePad has + /// a high-frequency vibration motor. + /// + /// true if this instance has a high frequency vibration motor; otherwise, false. public bool HasRightVibrationMotor { get { return false; } } + /// + /// Gets a value describing whether this GamePad has + /// a microphone input. + /// + /// true if this instance has a microphone input; otherwise, false. public bool HasVoiceSupport { get { return false; } } + /// + /// Gets a value describing whether this GamePad is + /// currently connected. + /// + /// true if this instance is currently connected; otherwise, false. public bool IsConnected { get { return is_connected; } } + /// A structure to test for equality. + /// A structure to test for equality. public static bool operator ==(GamePadCapabilities left, GamePadCapabilities right) { return left.Equals(right); } + /// A structure to test for inequality. + /// A structure to test for inequality. public static bool operator !=(GamePadCapabilities left, GamePadCapabilities right) { return !left.Equals(right); } + /// + /// Returns a that represents the current . + /// + /// A that represents the current . public override string ToString() { return String.Format( @@ -204,6 +345,11 @@ namespace OpenTK.Input IsConnected); } + /// + /// Serves as a hash function for a object. + /// + /// A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a + /// hash table. public override int GetHashCode() { return @@ -212,6 +358,12 @@ namespace OpenTK.Input gamepad_type.GetHashCode(); } + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// true if the specified is equal to the current + /// ; otherwise, false. public override bool Equals(object obj) { return @@ -223,6 +375,12 @@ namespace OpenTK.Input #region IEquatable Members + /// + /// Determines whether the specified is equal to the current . + /// + /// The to compare with the current . + /// true if the specified is equal to the current + /// ; otherwise, false. public bool Equals(GamePadCapabilities other) { return