当前位置: 首页>>代码示例>>C#>>正文


C# Input.MouseWheelEventArgs类代码示例

本文整理汇总了C#中OpenTK.Input.MouseWheelEventArgs的典型用法代码示例。如果您正苦于以下问题:C# MouseWheelEventArgs类的具体用法?C# MouseWheelEventArgs怎么用?C# MouseWheelEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MouseWheelEventArgs类属于OpenTK.Input命名空间,在下文中一共展示了MouseWheelEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnMouseWheel

 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;
 }
开发者ID:Blezzing,项目名称:Brawlocks,代码行数:7,代码来源:GameState.cs

示例2: Mouse_WheelChanged

        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
        }
开发者ID:DynaStudios,项目名称:LD23Jam,代码行数:28,代码来源:Player.cs

示例3: OnMouseWheel

        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);
        }
开发者ID:ikkentim,项目名称:PythagorasTree,代码行数:12,代码来源:PythagorasWindow.cs

示例4: OnMouseWheel

        protected void OnMouseWheel(object sender, MouseWheelEventArgs e)
        {
            if (!Focused)
                return;

            gwenInput.ProcessMouseMessage(e);
        }
开发者ID:Robmaister,项目名称:SharpNav,代码行数:7,代码来源:ExampleWindow.cs

示例5: WheelMove

 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));
 }
开发者ID:killowatt,项目名称:Dunamis,代码行数:7,代码来源:Mouse.cs

示例6: MouseWheelChanged

 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     LauncherTableWidget table = (LauncherTableWidget)widgets[view.tableIndex];
     table.CurrentIndex -= e.Delta;
     MarkPendingRedraw();
 }
开发者ID:Retatta,项目名称:ClassicalSharp,代码行数:6,代码来源:ServersScreen.cs

示例7: MouseZoom

 public virtual bool MouseZoom( MouseWheelEventArgs e )
 {
     return false;
 }
开发者ID:andrewphorn,项目名称:ClassicalSharp,代码行数:4,代码来源:Camera.cs

示例8: MouseWheelChanged

 protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
 {
     AdjustSelectedColour( e.Delta );
 }
开发者ID:Chameleonherman,项目名称:ClassicalSharp,代码行数:4,代码来源:ColoursScreen.cs

示例9: Game_WheelChanged

		private void Game_WheelChanged(object sender, MouseWheelEventArgs e)
		{
			chaseDistance -= e.Delta;
		}
开发者ID:tpb3d,项目名称:TPB3D,代码行数:4,代码来源:Game.cs

示例10: OnMouseWheel

 public void OnMouseWheel(object s, MouseWheelEventArgs e)
 {
     this.ZoomTarget *= (double) Math.Pow(1.1f,e.DeltaPrecise);
 }
开发者ID:KommuSoft,项目名称:SoftAlgos,代码行数:4,代码来源:Camera.cs

示例11: HandleMouseWheel

 internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
 {
     state = e.Mouse;
     WheelChanged(this, e);
 }
开发者ID:RetroAchievements,项目名称:opentk,代码行数:5,代码来源:MouseDevice.cs

示例12: OnMouseWheelChanged

        void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
        {
            dy = e.Delta * MOUSE_DOLLY_SPEED;

            cameraPosition[2] -= dy;

            //if (cameraPosition[2] < 0)
            //    cameraPosition[2] = 0;
                    
        }
开发者ID:OpenAVR,项目名称:LiveScan3D,代码行数:10,代码来源:OpenGLWindow.cs

示例13: OnMouseWheelChanged

        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);
        }
开发者ID:TriDevs,项目名称:TriEngine,代码行数:16,代码来源:InputManager.cs

示例14: OnMouseWheeled

 public static void OnMouseWheeled(object sender, MouseWheelEventArgs args)
 {
     //	Renderer.Render.Instance.gui.Input.ProcessMouseMessage(args);
 }
开发者ID:pdabbadabba,项目名称:Beatdown,代码行数:4,代码来源:InputHandler.cs

示例15: MouseWheelChanged

        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;
            }
        }
开发者ID:andrewphorn,项目名称:ClassicalSharp,代码行数:13,代码来源:InputHandler.cs


注:本文中的OpenTK.Input.MouseWheelEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。