Esempio n. 1
0
        public MacroMouse Wheel(WheelDirection Direction, double Count)
        {
            if (Count <= 0)
            {
                throw new ArgumentOutOfRangeException("Count");
            }

            MouseEvent E;

            if (Direction == WheelDirection.Up || Direction == WheelDirection.Down)
            {
                E = MouseEvent.MOUSEEVENTF_WHEEL;
            }
            else
            {
                E = MouseEvent.MOUSEEVENTF_HWHEEL;
            }

            int dwData = (int)(120.0 * Count);

            if (Direction == WheelDirection.Left || Direction == WheelDirection.Down)
            {
                dwData = -dwData;
            }

            StaticFunction.mouse_event((int)E, 0, 0, dwData, IntPtr.Zero);

            return(this);
        }
Esempio n. 2
0
    public void ShowAndEnableSteeringWheel()
    {
        interactable = true;

        steeringWheelSlider.value = 1;
        wheelDirection            = WheelDirection.Forward;

        steeringWheelSlider.gameObject.SetActive(true);
        steeringWheelSlider.interactable = true;
    }
Esempio n. 3
0
 internal void setVelocity(int velocityLeft, int veloctiyRight, WheelDirection wheelDirectionLeft, WheelDirection wheelDirectionRight)
 {
     lock (_lockObject)
     {
         if (this._RobotState != RobotStates.VelocityMode)
         {
             return;
         }
         _vLeft  = velocityLeft * (wheelDirectionLeft.Equals(WheelDirection.Forwards) ? 1 : -1);
         _vRight = veloctiyRight * (wheelDirectionRight.Equals(WheelDirection.Forwards) ? 1 : -1);
     }
 }
Esempio n. 4
0
 private void UpdateWheelDirection()
 {
     if (steeringWheelSlider.value == 0)
     {
         wheelDirection = WheelDirection.Left;
     }
     else if (steeringWheelSlider.value == 1)
     {
         wheelDirection = WheelDirection.Forward;
     }
     else
     {
         wheelDirection = WheelDirection.Right;
     }
 }
Esempio n. 5
0
 public MouseWheelGesture(ModifierKeys modifiers, WheelDirection direction)
     : base(MouseAction.WheelClick, modifiers)
 {
     this.direction = direction;
 }
 public MouseWheelGesture(ModifierKeys modifiers, WheelDirection direction)
     : base(MouseAction.WheelClick, modifiers)
 {
     this.direction = direction;
 }
Esempio n. 7
0
		public MouseWheelEvent(Scene scene, WheelDirection direction, InteractionModifier modifier) : base(scene)
		{
			Direction = direction;
			Modifier = modifier;
		}