Defines the event data for MouseDevice.WheelChanged events.

Do not cache instances of this type outside their event handler. If necessary, you can clone an instance using the MouseWheelEventArgs(MouseWheelEventArgs) constructor.

Inheritance: MouseEventArgs
Exemple #1
0
        void Mouse_WheelChanged(object sender, MouseWheelEventArgs e)
        {
            #region LOL Better Don't look to long at this crap here

            if (e.Delta == 1)
            {
                if (WeaponSelectIndex != 0)
                {
                    WeaponSelectIndex--;
                }
                else
                {
                    WeaponSelectIndex = 3;
                }
            }
            else
            {
                if (WeaponSelectIndex != 3)
                {
                    WeaponSelectIndex++;
                }
                else
                {
                    WeaponSelectIndex = 0;
                }
            }
        #endregion
        }
Exemple #2
0
 public void OnMouseWheel(MouseWheelEventArgs e)
 {
     if (e.DeltaPrecise > 0)
         game.GAME_VIEW.zoom += 0.05;
     else if (e.DeltaPrecise < 0)
         game.GAME_VIEW.zoom -= 0.05;
 }
Exemple #3
0
        void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
        {
            float speed = ZoomSpeed;

            if (Keyboard[OpenTK.Input.Key.ShiftLeft])
            {
                speed *= 0.1f;
            }
            else if (Keyboard[OpenTK.Input.Key.ControlLeft])
            {
                speed *= 20.0f;
            }

            eyeDistTarget -= e.Delta * speed;
            if (eyeDistTarget < zNear + 1)
            {
                eyeDistTarget = zNear + 1;
            }
            else if (eyeDistTarget > zFar - 6)
            {
                eyeDistTarget = zFar - 6;
            }

            //EyeDist = eyeDistTarget;
            Animation.StartAnimation(new Animation <float> (this, "EyeDist", eyeDistTarget, (eyeDistTarget - eyeDist) * 0.1f));
        }
Exemple #4
0
 private void BoardGame_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     if (e.Delta < 0)
     {
         _view.ZoomOut();
     }
     else
     {
         _view.ZoomIn();
     }
 }
        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            _scale += e.DeltaPrecise > 0 ? _scale/10 : -_scale/10;
            if (_scale < float.Epsilon) _scale = float.Epsilon;

            Rescale();

            if (e.Mouse.MiddleButton == ButtonState.Released)
                CalcData();

            base.OnMouseWheel(e);
        }
Exemple #6
0
 void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     if (e.Delta > 0)
     {
         Key.Event(Key.K_MWHEELUP, true);
         Key.Event(Key.K_MWHEELUP, false);
     }
     else
     {
         Key.Event(Key.K_MWHEELDOWN, true);
         Key.Event(Key.K_MWHEELDOWN, false);
     }
 }
 void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     if (e.Delta > 0)
     {
         game_engine.Key_Event(q_shared.K_MWHEELUP, true);
         game_engine.Key_Event(q_shared.K_MWHEELUP, false);
     }
     else
     {
         game_engine.Key_Event(q_shared.K_MWHEELDOWN, true);
         game_engine.Key_Event(q_shared.K_MWHEELDOWN, false);
     }
 }
Exemple #8
0
        void OpenGLTess_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
        {
            if (!_enabled)
            {
                return;
            }

            float delta = 0.0f;

            if (e.Delta != 0)
            { // Firefox
                delta = -(float)e.Delta / 3.0f;
            }

            _zoomStart.Y += delta * 0.05f;
        }
Exemple #9
0
        void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
        {
            float speed = ZoomSpeed;

            if (Keyboard [OpenTK.Input.Key.ShiftLeft])
            {
                if (e.Delta > 0)
                {
                    terrain.SelectionRadius *= 1.25f;
                }
                else
                {
                    terrain.SelectionRadius *= 0.8f;
                }
                if (terrain.SelectionRadius > 0.1f)
                {
                    terrain.SelectionRadius = 0.1f;
                }
                else if (terrain.SelectionRadius < 1f / 1024f)
                {
                    terrain.SelectionRadius = 1f / 1024f;
                }
                return;
            }
            if (Keyboard[OpenTK.Input.Key.ShiftLeft])
            {
                speed *= 0.1f;
            }
            else if (Keyboard[OpenTK.Input.Key.ControlLeft])
            {
                speed *= 20.0f;
            }

            eyeDistTarget -= e.Delta * speed;
            if (eyeDistTarget < zNear + 1)
            {
                eyeDistTarget = zNear + 1;
            }
            else if (eyeDistTarget > zFar - 6)
            {
                eyeDistTarget = zFar - 6;
            }

            //EyeDist = eyeDistTarget;
            Animation.StartAnimation(new Animation <float> (this, "EyeDist", eyeDistTarget, (eyeDistTarget - eyeDist) * 0.1f));
        }
        void mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
        {
            Vector2 position = new Vector2(e.X, e.Y);

            root.OnMouseWheelChanged(new MouseWheelEventArgs(e.DeltaPrecise, GetModifierKeys()));
        }
Exemple #11
0
        protected void OnMouseWheel(object sender, MouseWheelEventArgs e)
        {
            if (!Focused)
                return;

            gwenInput.ProcessMouseMessage(e);
        }
Exemple #12
0
 private void WheelMove(object sender, MouseWheelEventArgs e)
 {
     if (!_window.Focused) return;
     _wheelPosition = e.ValuePrecise;
     if(Wheel != null)
         Wheel(sender, new DunamisMouseWheelEventArgs(e.Value, e.ValuePrecise, e.Delta));
 }
Exemple #13
0
 private void GameWindow_MouseWheel(object sender, MouseWheelEventArgs e)
 {
     visual.OrbitCamera.Distance -= e.DeltaPrecise;
 }
Exemple #14
0
 public void OnMouseWheel(OpenTK.Input.MouseWheelEventArgs e)
 {
 }
Exemple #15
0
 public virtual bool MouseZoom( MouseWheelEventArgs e )
 {
     return false;
 }
 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     AdjustSelectedColour( e.Delta );
 }
 protected override void OnMouseWheel(OpenTK.Input.MouseWheelEventArgs e)
 {
     base.OnMouseWheel(e);
     renderer.OnMouseWheelMove(e.DeltaPrecise);
 }
Exemple #18
0
 internal static void MouseWheel(object Sender, MouseWheelEventArgs mouse)
 {
     WheelPosition += mouse.Delta;
 }
Exemple #19
0
        /// <summary>
        /// Kaldes når mussehjulet drejes
        /// </summary>
        /// <param name="e"></param>
        protected override void OnMouseWheel(MouseWheelEventArgs e)
        {
            base.OnMouseWheel(e);

            States.Peek().OnMouseWheel(e);
        }
Exemple #20
0
 void Mouse_WheelChanged(object sender, MouseWheelEventArgs e)
 {
     gameWidth /= Math.Exp(e.Delta / 10.0);
     gameHeight /= Math.Exp(e.Delta / 10.0);
     gameWidth = Calculator.Clip((extents[1] - extents[0]) / 20.0, (extents[1] - extents[0]) * 20.0, gameWidth);
     gameHeight = Calculator.Clip((extents[3] - extents[2]) / 20.0, (extents[3] - extents[2]) * 20.0, gameHeight);
 }
Exemple #21
0
 private void W_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     //throw new System.NotImplementedException();
 }
Exemple #22
0
 internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
 {
     state = e.Mouse;
     WheelChanged(this, e);
 }
Exemple #23
0
 private void Window_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     zoom -= zoom * e.DeltaPrecise / 10f;
     Console.WriteLine("zoom: " + zoom);
 }
 protected virtual void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
 }
Exemple #25
0
 public static void OnMouseWheeled(object sender, MouseWheelEventArgs args)
 {
     //	Renderer.Render.Instance.gui.Input.ProcessMouseMessage(args);
 }
		private void realInput_WheelChanged(object sender, MouseWheelEventArgs e)
		{
			if (this.pipeWheel != null)
				this.pipeWheel(sender, e);
		}
Exemple #27
0
        private void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
        {
            var changeFunc = WheelChanged;
            var downFunc = WheelDown;
            var upFunc = WheelUp;

            var delta = e.DeltaPrecise;

            if (delta < 0 && downFunc != null)
                downFunc(this, e);
            else if (delta > 0 && upFunc != null)
                upFunc(this, e);

            if (changeFunc != null)
                changeFunc(this, e);
        }
        void MouseWheelChanged( object sender, MouseWheelEventArgs e )
        {
            if( !game.GetActiveScreen.HandlesMouseScroll( e.Delta ) ) {
                Inventory inv = game.Inventory;
                if( game.Camera.MouseZoom( e ) || !inv.CanChangeHeldBlock ) return;

                int diff = -e.Delta % inv.Hotbar.Length;
                int newIndex = inv.HeldBlockIndex + diff;
                if( newIndex < 0 ) newIndex += inv.Hotbar.Length;
                if( newIndex >= inv.Hotbar.Length ) newIndex -= inv.Hotbar.Length;
                inv.HeldBlockIndex = newIndex;
            }
        }
Exemple #29
0
        void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
        {
            dy = e.Delta * MOUSE_DOLLY_SPEED;

            cameraPosition[2] -= dy;

            //if (cameraPosition[2] < 0)
            //    cameraPosition[2] = 0;
                    
        }
Exemple #30
0
 /// <summary>
 /// Constructs a new <see cref="MouseWheelEventArgs"/> instance.
 /// </summary>
 /// <param name="args">The <see cref="MouseWheelEventArgs"/> instance to clone.</param>
 public MouseWheelEventArgs(MouseWheelEventArgs args)
     : this(args.X, args.Y, args.Value, args.Delta)
 {
 }
 internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
 {
     state = e.Mouse;
     WheelChanged(this, e);
 }
Exemple #32
0
 public override bool MouseZoom( MouseWheelEventArgs e )
 {
     distance -= e.DeltaPrecise;
     if( distance < 2 ) distance = 2;
     return true;
 }
Exemple #33
0
 private void MouseKeyboard_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     OnZoomChanged(new OrientPosEventArgs(e.Value * 2, 0));
 }
        protected virtual void mouseWheelHandler(object sender, MouseWheelEventArgs e)
        {
            if (!base.Focused) return;

            // Console.WriteLine("mousewheel {0} {1}",e.Delta,e.DeltaPrecise);
            SSCameraThirdPerson ctp = scene.ActiveCamera as SSCameraThirdPerson;
            if (ctp != null) {
                ctp.followDistance += -e.DeltaPrecise;
            }
        }
Exemple #35
0
 public void OnMouseWheel(MouseWheelEventArgs e)
 {
     OnMouseWheel (null,e);
 }
 void Mouse_Wheel(object sender, MouseWheelEventArgs args)
 {
     input.ProcessMouseMessage(args);
 }
Exemple #37
0
 public void OnMouseWheel(object s, MouseWheelEventArgs e)
 {
     this.ZoomTarget *= (double) Math.Pow(1.1f,e.DeltaPrecise);
 }
 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     LauncherTableWidget table = (LauncherTableWidget)widgets[view.tableIndex];
     table.CurrentIndex -= e.Delta;
     MarkPendingRedraw();
 }
 /// <summary>
 /// Event handler for mouse wheel event
 /// </summary>
 /// <param name="sender">event sender object</param>
 /// <param name="e">event arguments</param>
 void Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     // Update z-Distance of camera
     _camZ -= (float)e.Delta;
 }
Exemple #40
0
		private void Game_WheelChanged(object sender, MouseWheelEventArgs e)
		{
			chaseDistance -= e.Delta;
		}
Exemple #41
0
 private void OnMouseWheelInternal(object sender, MouseWheelEventArgs e) { OnMouseWheel(e); }
 private void MouseWheelChanged(object sender, MouseWheelEventArgs e)
 {
     navigation.MouseWheelUpdateFocus(e.DeltaPrecise);
 }
Exemple #43
0
 /// <summary>
 /// Raises the <see cref="MouseWheel"/> event.
 /// </summary>
 /// <param name="e">
 /// A <see cref="MouseWheelEventArgs"/> instance carrying mouse state information.
 /// The information carried by this instance is only valid within this method body.
 /// </param>
 protected virtual void OnMouseWheel(MouseWheelEventArgs e)
 {
     MouseWheel(this, e);
 }
Exemple #44
0
 public void OnMouseWheel(MouseWheelEventArgs e)
 {
     
 }
Exemple #45
0
 /// <summary>
 /// Constructs a new <see cref="MouseWheelEventArgs"/> instance.
 /// </summary>
 /// <param name="args">The <see cref="MouseWheelEventArgs"/> instance to clone.</param>
 public MouseWheelEventArgs(MouseWheelEventArgs args)
     : this(args.X, args.Y, args.Value, args.Delta)
 {
 }