/// <summary> /// Adds a new layout that cane be used for mapping gamepads to <see cref="GamePadState"/> /// </summary> /// <param name="layout">The layout to add</param> public static void AddLayout(GamePadLayout layout) { lock (layouts) { if (!layouts.Contains(layout)) { layouts.Add(layout); } } }
/// <summary> /// Initializes a new instance of the <see cref="GamePadFromLayout"/> class. /// </summary> protected GamePadFromLayout(InputManager inputManager, IGameControllerDevice controller, GamePadLayout layout) { InputManager = inputManager; Layout = layout; GameControllerDevice = controller; }
public GamePadDirectInput(InputSourceWindowsDirectInput source, InputManager inputManager, GameControllerDirectInput controller, GamePadLayout layout) : base(inputManager, controller, layout) { this.controller = controller; Source = source; Name = controller.Name; Id = controller.Id; ProductId = controller.ProductId; }
public GamePadSDL(InputSourceSDL source, InputManager inputManager, GameControllerSDL controller, GamePadLayout layout) : base(inputManager, controller, layout) { Source = source; Name = controller.Name; Id = controller.Id; ProductId = controller.ProductId; }