Beispiel #1
0
 // ---------------------
 public void CopyFrom(JoystickStateBinding b)
 {
     if (this.enabled = b.enabled)
     {
         this.Enable();
         this.dirBinding.CopyFrom(b.dirBinding);
         this.horzAxisBinding.CopyFrom(b.horzAxisBinding);
         this.vertAxisBinding.CopyFrom(b.vertAxisBinding);
     }
 }
        // ------------------
        public TouchGestureStateBinding(InputBindingBase parent = null) : base(parent)
        {
            this.enabled = false;

            this.rawPressBinding    = new DigitalBinding(this);
            this.longPressBinding   = new DigitalBinding(this);
            this.normalPressBinding = new DigitalBinding(this);
            //this.releasedBinding	= new DigitalBinding(this);
            this.tapBinding       = new DigitalBinding(this);
            this.doubleTapBinding = new DigitalBinding(this);
            this.longTapBinding   = new DigitalBinding(this);



            this.normalPressSwipeHorzAxisBinding = new AxisBinding(this);
            this.normalPressSwipeVertAxisBinding = new AxisBinding(this);
            this.longPressSwipeHorzAxisBinding   = new AxisBinding(this);
            this.longPressSwipeVertAxisBinding   = new AxisBinding(this);

            this.normalPressScrollHorzBinding = new ScrollDeltaBinding(this);
            this.normalPressScrollVertBinding = new ScrollDeltaBinding(this);
            this.longPressScrollHorzBinding   = new ScrollDeltaBinding(this);
            this.longPressScrollVertBinding   = new ScrollDeltaBinding(this);


            this.rawPressEmuTouchBinding    = new EmuTouchBinding(this);
            this.normalPressEmuTouchBinding = new EmuTouchBinding(this);
            this.longPressEmuTouchBinding   = new EmuTouchBinding(this);

            this.rawPressMousePosBinding         = new MousePositionBinding(10, false, this);
            this.normalPressMousePosBinding      = new MousePositionBinding(20, false, this);
            this.longPressMousePosBinding        = new MousePositionBinding(20, false, this);
            this.tapMousePosBinding              = new MousePositionBinding(30, false, this);
            this.doubleTapMousePosBinding        = new MousePositionBinding(30, false, this);
            this.longTapMousePosBinding          = new MousePositionBinding(30, false, this);
            this.normalPressSwipeMousePosBinding = new MousePositionBinding(20, false, this);
            this.longPressSwipeMousePosBinding   = new MousePositionBinding(20, false, this);


            this.normalPressSwipeDirBinding = new DirectionBinding(this);
            this.longPressSwipeDirBinding   = new DirectionBinding(this);

            this.normalPressSwipeJoyBinding = new JoystickStateBinding(this);
            this.longPressSwipeJoyBinding   = new JoystickStateBinding(this);
        }