Class GamePadLayout
Provides a IGameControllerDevice to IGamePadDevice mapping
public abstract class GamePadLayout- Inheritance
- 
      objectGamePadLayout
- Derived
Fields
mapFirstPovToPad
Should direction controller 0 be mapped to the directional pad?
protected bool mapFirstPovToPadField Value
Methods
AddAxisToAxis(int, GamePadAxis, bool, bool)
Adds a mapping from an axis index to GamePadAxis
protected void AddAxisToAxis(int index, GamePadAxis axis, bool invert = false, bool remap = false)Parameters
- indexint
- The axis index of the axis on this device 
- axisGamePadAxis
- The axis to map to 
- invertbool
- Should axis be inverted 
- remapbool
- Remap this axis from (-1,1) to (0,1) 
AddAxisToButton(int, GamePadButton)
Adds a mapping from an axis index to GamePadButton
protected void AddAxisToButton(int index, GamePadButton button)Parameters
- indexint
- The axis index of the axis on this device 
- buttonGamePadButton
- The button(s) to map to 
AddButtonToAxis(int, GamePadAxis, bool)
Adds a mapping from a button index to GamePadAxis
protected void AddButtonToAxis(int index, GamePadAxis axis, bool invert = false)Parameters
- indexint
- The button index of the button on this device 
- axisGamePadAxis
- The axi to map to 
- invertbool
- Should axis be inverted, output -1 instead of 1 on press 
AddButtonToButton(int, GamePadButton)
Adds a mapping from a button index to GamePadButton
protected void AddButtonToButton(int index, GamePadButton button)Parameters
- indexint
- The button index of the button on this device 
- buttonGamePadButton
- The button(s) to map to 
CompareProductId(Guid, Guid, int, int)
Compares a product id
public static bool CompareProductId(Guid a, Guid b, int numBytes = 16, int byteOffset = 0)Parameters
- aGuid
- id a 
- bGuid
- id b 
- numBytesint
- number of bytes to compare, starting from - byteOffset
- byteOffsetint
- starting byte index from where to compare 
Returns
InitializeDevice(IGamePadDevice, IGameControllerDevice)
Allows the user to perform some additional setup operations when using this layout on a device
public virtual void InitializeDevice(IGamePadDevice targetDevice, IGameControllerDevice sourceDevice)Parameters
- targetDeviceIGamePadDevice
- The gamepad that events are mapped to 
- sourceDeviceIGameControllerDevice
- The game controller that is mapped to a gamepad 
MapInputEvent(IGamePadDevice, IGameControllerDevice, InputEvent, List<InputEvent>)
Maps game controller events to gamepad events
public virtual void MapInputEvent(IGamePadDevice targetDevice, IGameControllerDevice sourceDevice, InputEvent controllerEvent, List<InputEvent> target)Parameters
- targetDeviceIGamePadDevice
- The gamepad that events are mapped to 
- sourceDeviceIGameControllerDevice
- The game controller that is mapped to a gamepad 
- controllerEventInputEvent
- The controller input event as a source 
- targetList<InputEvent>
- Target list 
MatchDevice(IInputSource, IGameControllerDevice)
Checks if a device matches this gamepad layout, and thus should use this when mapping it to a GamePadState
public abstract bool MatchDevice(IInputSource source, IGameControllerDevice device)Parameters
- sourceIInputSource
- Source that this device comes from 
- deviceIGameControllerDevice
- The device to match