當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。