예제 #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);
         }
     }
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }