Show / Hide Table of Contents

Struct GamepadState

Represents state of gamepad connected to PC

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Phoenix.Input
Assembly: Phoenix.Plugin.Input.dll
Syntax
public struct GamepadState

Properties

View Source

Buttons

Gets the buttons state

Declaration
public readonly ushort Buttons { get; }
Property Value
Type Description
System.UInt16
View Source

LeftThumbX

Gets or sets the left thumb X

Declaration
public short LeftThumbX { get; set; }
Property Value
Type Description
System.Int16
View Source

LeftThumbY

Gets or sets the left thumb Y

Declaration
public short LeftThumbY { get; set; }
Property Value
Type Description
System.Int16
View Source

LeftTrigger

Gets the left trigger value

Declaration
public readonly byte LeftTrigger { get; }
Property Value
Type Description
System.Byte
View Source

PacketNumber

Gets the packet number

Declaration
public readonly int PacketNumber { get; }
Property Value
Type Description
System.Int32
View Source

RightThumbX

Gets or sets the right thumb X

Declaration
public short RightThumbX { get; set; }
Property Value
Type Description
System.Int16
View Source

RightThumbY

Gets or sets the right thumb Y

Declaration
public short RightThumbY { get; set; }
Property Value
Type Description
System.Int16
View Source

RightTrigger

Gets the right trigger value

Declaration
public readonly byte RightTrigger { get; }
Property Value
Type Description
System.Byte

Methods

View Source

GetAnalogSigned(Int16)

Convert signed short to signed float

Declaration
public static float GetAnalogSigned(short signedValue)
Parameters
Type Name Description
System.Int16 signedValue

Signed value to convert

Returns
Type Description
System.Single

Signed float result

View Source

GetAnalogUnsigned(Byte)

Convert unsigned byte to unsigned float

Declaration
public static float GetAnalogUnsigned(byte unsignedValue)
Parameters
Type Name Description
System.Byte unsignedValue

Unsigned value to convert

Returns
Type Description
System.Single

Unsigned float result

View Source

IsButtonPressed(GamepadState.ButtonValues)

Checks if a button is pressed

Declaration
public bool IsButtonPressed(GamepadState.ButtonValues button)
Parameters
Type Name Description
GamepadState.ButtonValues button

Button to check

Returns
Type Description
System.Boolean

Whether button was pressed

  • View Source
In This Article
Back to top Generated by DocFX