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); }
public void ShowAndEnableSteeringWheel() { interactable = true; steeringWheelSlider.value = 1; wheelDirection = WheelDirection.Forward; steeringWheelSlider.gameObject.SetActive(true); steeringWheelSlider.interactable = true; }
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); } }
private void UpdateWheelDirection() { if (steeringWheelSlider.value == 0) { wheelDirection = WheelDirection.Left; } else if (steeringWheelSlider.value == 1) { wheelDirection = WheelDirection.Forward; } else { wheelDirection = WheelDirection.Right; } }
public MouseWheelGesture(ModifierKeys modifiers, WheelDirection direction) : base(MouseAction.WheelClick, modifiers) { this.direction = direction; }
public MouseWheelEvent(Scene scene, WheelDirection direction, InteractionModifier modifier) : base(scene) { Direction = direction; Modifier = modifier; }