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


C# Window.MouseMoveEventArgs类代码示例

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


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

示例1: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.X, (int) e.Y)))
         _color = Color.LightSteelBlue;
     else
         _color = Color.White;
 }
开发者ID:Tri125,项目名称:space-station-14,代码行数:7,代码来源:CraftSlotUi.cs

示例2: OnMouseMoved

 private void OnMouseMoved(object sender, MouseMoveEventArgs e)
 {
     foreach (var w in Widgets)
     {
         w.Update(e.X, e.Y, false);
     }
 }
开发者ID:Tetramputechture,项目名称:Ending_0.1b,代码行数:7,代码来源:Screen.cs

示例3: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     if (ClientArea.Contains(e.X, e.Y))
         _color = new Color(176, 222, 196);
     else
         _color = Color.White;
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:7,代码来源:CraftSlotUi.cs

示例4: EventToWindowPos

 /// <summary>
 /// Returns event position of MouseMoveEvent where it would be if the window wasn't resized
 /// See Terminology above
 /// </summary>
 public MouseMoveEventArgs EventToWindowPos(MouseMoveEventArgs mouseMoveEvent)
 {
     Vector2i windowPos = (Vector2i)_window.MapPixelToCoords(
         new Vector2i((int)mouseMoveEvent.X, (int)mouseMoveEvent.Y), _interfaceView);
     mouseMoveEvent.X = (int)windowPos.X;
     mouseMoveEvent.Y = (int)windowPos.Y;
     MouseMoveEvent newMouseEvent = new MouseMoveEvent();
     newMouseEvent.X = windowPos.X;
     newMouseEvent.Y = windowPos.Y;
     MouseMoveEventArgs eventArgsWindowPos = new MouseMoveEventArgs(newMouseEvent);
     return eventArgsWindowPos;
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:16,代码来源:CluwneView.cs

示例5: MouseMove

        public override void MouseMove(MouseMoveEventArgs e)
        {
            if (ClientArea.Contains(e.X, e.Y))
            {
                _buttonLeft.MouseMove(e);
                _buttonRight.MouseMove(e);

                foreach (var curr in _items)
                {
                    curr.Key.MouseMove(e);
                }
            }
        }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:13,代码来源:LobbyShowcase.cs

示例6: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     if (dragging)
     {
         Position = new Vector2i((int) e.X, (int) e.Y);
     }
     else
     {
         foreach (StatusEffectButton button in buttons)
         {
             button.MouseMove(e);
         }
     }
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:14,代码来源:StatusEffectBar.cs

示例7: MouseMove

		public override void MouseMove(MouseMoveEventArgs e)
        {
            if (disposing || !IsVisible()) return;
            base.MouseMove(e);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:5,代码来源:EntitySpawnPanel.cs

示例8: MouseMove

 public void MouseMove ( MouseMoveEventArgs e )
 {
     UserInterfaceManager.MouseMove(e);
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:4,代码来源:LobbyScreen.cs

示例9: OnMouseMove

 private void OnMouseMove(object sender, MouseMoveEventArgs e)
 {
 }
开发者ID:ComposerCookie,项目名称:TeamSmiter,代码行数:3,代码来源:TeamGodEdit.cs

示例10: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.X, (int) e.Y)))
     {
         showTooltip = true;
         tooltipPos = new Point((int) e.X, (int) e.Y);
     }
     else
         showTooltip = false;
 }
开发者ID:Wabooti,项目名称:space-station-14,代码行数:10,代码来源:StatusEffectButton.cs

示例11: MouseMoved

        public void MouseMoved ( MouseMoveEventArgs e )
        {

        }
开发者ID:millpond,项目名称:space-station-14,代码行数:4,代码来源:LobbyScreen.cs

示例12: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     _bgcol = ClientArea.Contains(e.X, e.Y)
                  ? new SFML.Graphics.Color(70, 130, 180)
                  : Color.Transparent;
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:6,代码来源:BlueprintButton.cs

示例13: OnMouseMoved

        /// <summary>
        /// Handles when the mouse has moved over the <see cref="Control"/>.
        /// This is called immediately before <see cref="Control.MouseMoved"/>.
        /// Override this method instead of using an event hook on <see cref="Control.MouseMoved"/> when possible.
        /// </summary>
        /// <param name="e">The event args.</param>
        protected override void OnMouseMoved(MouseMoveEventArgs e)
        {
            base.OnMouseMoved(e);

            _state = CheckBoxState.Over;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:CheckBox.cs

示例14: MouseMove

 public override void MouseMove(MouseMoveEventArgs e)
 {
     _currentColor = ClientArea.Contains(e.X, e.Y)
                         ? new SFML.Graphics.Color(211, 211, 211)
                         : new SFML.Graphics.Color(128, 128, 128);
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:6,代码来源:ContextMenu.cs

示例15: OnMouseMove

        private void OnMouseMove(object sender, MouseMoveEventArgs e)
        {
            RenderWindow window = (RenderWindow)sender;
            if (down && (MainViewer.Instance.CurrentTool == (int)ToolType.Pencil || MainViewer.Instance.CurrentTool == (int)ToolType.Eraser))
            {
                x1 = lastposition.X / zoom + OffsetX;
                y1 = lastposition.Y / zoom + OffsetY;

                lastposition = new Vector2f(e.X, e.Y);

                x2 = lastposition.X / zoom + OffsetX;
                y2 = lastposition.Y / zoom + OffsetY;

                differenceX = x1 - x2;
                differenceY = y1 - y2;

                Console.Out.WriteLine(zoom);

                if (differenceX == 0)
                {
                    if (differenceY <= 0)
                    {
                        vertexesToDraw[0] = new Vector2f(x1 - halfSize, y1 - halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 + halfSize, y1 - halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 - halfSize, y1 + halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 + halfSize, y2 + halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 - halfSize, y2 + halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 - halfSize, y2 + halfSize);
                    }

                    else
                    {
                        vertexesToDraw[0] = new Vector2f(x1 + halfSize, y1 + halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 - halfSize, y1 + halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 + halfSize, y1 - halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 - halfSize, y2 - halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 + halfSize, y2 - halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 + halfSize, y2 - halfSize);
                    }
                }

                else if (differenceX < 0)
                {
                    if (differenceY <= 0)
                    {
                        vertexesToDraw[0] = new Vector2f(x1 - halfSize, y1 - halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 + halfSize, y1 - halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 - halfSize, y1 + halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 + halfSize, y2 - halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 - halfSize, y2 + halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 + halfSize, y2 + halfSize);
                    }

                    else
                    {
                        vertexesToDraw[0] = new Vector2f(x1 - halfSize, y1 + halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 - halfSize, y1 - halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 + halfSize, y1 + halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 - halfSize, y2 - halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 + halfSize, y2 + halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 + halfSize, y2 - halfSize);
                    }
                }

                else
                {
                    if (differenceY <= 0)
                    {
                        vertexesToDraw[0] = new Vector2f(x1 + halfSize, y1 - halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 - halfSize, y1 - halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 + halfSize, y1 + halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 - halfSize, y2 - halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 + halfSize, y2 + halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 - halfSize, y2 + halfSize);
                    }

                    else
                    {
                        vertexesToDraw[0] = new Vector2f(x1 + halfSize, y1 + halfSize);
                        vertexesToDraw[1] = new Vector2f(x1 - halfSize, y1 + halfSize);
                        vertexesToDraw[2] = new Vector2f(x1 + halfSize, y1 - halfSize);
                        vertexesToDraw[3] = new Vector2f(x2 - halfSize, y2 + halfSize);
                        vertexesToDraw[4] = new Vector2f(x2 + halfSize, y2 - halfSize);
                        vertexesToDraw[5] = new Vector2f(x2 - halfSize, y2 - halfSize);
                    }
                }

                switch (MainViewer.Instance.CurrentTool)
                {
                    case (int)ToolType.Pencil:
                        for (int i = 0; i < 6; i++)
                        {
                            lines.Append(new Vertex(vertexesToDraw[i], MainViewer.Instance.PickedColor[MainViewer.Instance.CurrentSelectedColor]));
                        }

                        break;
                    case (int)ToolType.Eraser:
                        for (int i = 0; i < 6; i++)
                        {
                            transparent.Append(new Vertex(vertexesToDraw[i], new SFML.Graphics.Color(0, 0, 0, 0)));
//.........这里部分代码省略.........
开发者ID:ComposerCookie,项目名称:TeamSmiter,代码行数:101,代码来源:SmiteMap.cs


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