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
Exemplo n.º 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
        }
Exemplo n.º 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;
 }
Exemplo n.º 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));
        }
Exemplo n.º 4
0
 private void BoardGame_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     if (e.Delta < 0)
     {
         _view.ZoomOut();
     }
     else
     {
         _view.ZoomIn();
     }
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 7
0
 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);
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 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));
        }
Exemplo n.º 10
0
        void mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs e)
        {
            Vector2 position = new Vector2(e.X, e.Y);

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

            gwenInput.ProcessMouseMessage(e);
        }
Exemplo n.º 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));
 }
Exemplo n.º 13
0
 private void GameWindow_MouseWheel(object sender, MouseWheelEventArgs e)
 {
     visual.OrbitCamera.Distance -= e.DeltaPrecise;
 }
Exemplo n.º 14
0
 public void OnMouseWheel(OpenTK.Input.MouseWheelEventArgs e)
 {
 }
Exemplo n.º 15
0
 public virtual bool MouseZoom( MouseWheelEventArgs e )
 {
     return false;
 }
Exemplo n.º 16
0
 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     AdjustSelectedColour( e.Delta );
 }
Exemplo n.º 17
0
 protected override void OnMouseWheel(OpenTK.Input.MouseWheelEventArgs e)
 {
     base.OnMouseWheel(e);
     renderer.OnMouseWheelMove(e.DeltaPrecise);
 }
Exemplo n.º 18
0
 internal static void MouseWheel(object Sender, MouseWheelEventArgs mouse)
 {
     WheelPosition += mouse.Delta;
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 21
0
 private void W_MouseWheel(object sender, OpenTK.Input.MouseWheelEventArgs e)
 {
     //throw new System.NotImplementedException();
 }
Exemplo n.º 22
0
 internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
 {
     state = e.Mouse;
     WheelChanged(this, e);
 }
Exemplo n.º 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 )
 {
 }
Exemplo n.º 25
0
 public static void OnMouseWheeled(object sender, MouseWheelEventArgs args)
 {
     //	Renderer.Render.Instance.gui.Input.ProcessMouseMessage(args);
 }
Exemplo n.º 26
0
		private void realInput_WheelChanged(object sender, MouseWheelEventArgs e)
		{
			if (this.pipeWheel != null)
				this.pipeWheel(sender, e);
		}
Exemplo n.º 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);
        }
Exemplo n.º 28
0
        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;
            }
        }
Exemplo n.º 29
0
        void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
        {
            dy = e.Delta * MOUSE_DOLLY_SPEED;

            cameraPosition[2] -= dy;

            //if (cameraPosition[2] < 0)
            //    cameraPosition[2] = 0;
                    
        }
Exemplo n.º 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)
 {
 }
Exemplo n.º 31
0
 internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
 {
     state = e.Mouse;
     WheelChanged(this, e);
 }
Exemplo n.º 32
0
 public override bool MouseZoom( MouseWheelEventArgs e )
 {
     distance -= e.DeltaPrecise;
     if( distance < 2 ) distance = 2;
     return true;
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 35
0
 public void OnMouseWheel(MouseWheelEventArgs e)
 {
     OnMouseWheel (null,e);
 }
 void Mouse_Wheel(object sender, MouseWheelEventArgs args)
 {
     input.ProcessMouseMessage(args);
 }
Exemplo n.º 37
0
 public void OnMouseWheel(object s, MouseWheelEventArgs e)
 {
     this.ZoomTarget *= (double) Math.Pow(1.1f,e.DeltaPrecise);
 }
Exemplo n.º 38
0
 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     LauncherTableWidget table = (LauncherTableWidget)widgets[view.tableIndex];
     table.CurrentIndex -= e.Delta;
     MarkPendingRedraw();
 }
Exemplo n.º 39
0
 /// <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;
 }
Exemplo n.º 40
0
Arquivo: Game.cs Projeto: tpb3d/TPB3D
		private void Game_WheelChanged(object sender, MouseWheelEventArgs e)
		{
			chaseDistance -= e.Delta;
		}
Exemplo n.º 41
0
 private void OnMouseWheelInternal(object sender, MouseWheelEventArgs e) { OnMouseWheel(e); }
Exemplo n.º 42
0
 private void MouseWheelChanged(object sender, MouseWheelEventArgs e)
 {
     navigation.MouseWheelUpdateFocus(e.DeltaPrecise);
 }
Exemplo n.º 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);
 }
Exemplo n.º 44
0
 public void OnMouseWheel(MouseWheelEventArgs e)
 {
     
 }
Exemplo n.º 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)
 {
 }