Ejemplo n.º 1
0
 /// <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);
         }
     }
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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;
 }