Пример #1
0
 public unsafe SdlGamepad(SdlInputContext ctx, int currentIndex, int instanceId)
 {
     _ctx            = ctx;
     InstanceId      = instanceId;
     ActualIndex     = currentIndex;
     VibrationMotors = new IMotor[] { new SdlMotor(0, this), new SdlMotor(1, this) };
     _controller     = ctx.Sdl.GameControllerOpen(currentIndex);
 }
Пример #2
0
 public unsafe SdlJoystick(SdlInputContext ctx, int currentIndex, int instanceId)
 {
     _ctx        = ctx;
     InstanceId  = instanceId;
     ActualIndex = currentIndex;
     _joystick   = _ctx.Sdl.JoystickOpen(currentIndex);
     _buttons    = new Button[0]; // arrays will be sized appropriately later
     _axes       = new Axis[0];
     _hats       = new Hat[0];
 }
Пример #3
0
 public SdlKeyboard(SdlInputContext ctx)
 {
     _ctx = ctx;
 }
Пример #4
0
 public SdlMouse(SdlInputContext ctx)
 {
     _ctx   = ctx;
     Cursor = new SdlCursor(this, ctx);
 }
Пример #5
0
 internal unsafe SdlCursor(SdlMouse mouse, SdlInputContext ctx)
 {
     _mouse = mouse;
     _ctx   = ctx;
 }