상속: System.EventArgs
예제 #1
0
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
 /// </summary>
 ///
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 protected internal virtual void OnMouseWheelMoved(MouseWheelEventArgs e)
 {
 }
예제 #2
0
		public override bool MouseWheelMove(MouseWheelEventArgs e)
        {
            if (_entityList.MouseWheelMove(e)) return true;
            if (base.MouseWheelMove(e)) return true;
            return false;
        }
예제 #3
0
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     return false;
 }
예제 #4
0
 public void MouseWheelMove(MouseWheelEventArgs e) {}
예제 #5
0
 private void MouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     if (OnMouseWheelMove != null && ContainsPoint(new Vector2i(e.X, e.Y)))
     {
         OnMouseWheelMove(sender, e, MouseCoordToDisplayCoord(new Vector2i(e.X, e.Y)));
     }
 }
예제 #6
0
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.X, (int) e.Y)))
     {
         if (ScrollingNeeded())
         {
             if (e.Delta> 0)
             {
                 if (ScrollOffset + 1 <= _items.Count - 1) ScrollOffset++;
                 return true;
             }
             else if (e.Delta < 0)
             {
                 if (ScrollOffset - 1 >= 0) ScrollOffset--;
                 return true;
             }
         }
     }
     return false;
 }
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     if (inner_focus != null)
     {
         if (inner_focus.MouseWheelMove(e))
             return true;
         else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y))
         {
             scrollbarV.MouseWheelMove(e);
             return true;
         }
     }
     else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y))
     {
         scrollbarV.MouseWheelMove(e);
         return true;
     }
     return false;
 }
예제 #8
0
 private void window_MouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     zoom -= e.Delta * 0.1f;
 }
예제 #9
0
 void OnMouseWheel(object sender, MouseWheelEventArgs e)
 {
     logIndex -= e.Delta * mouseScrollSpeed;
     UpdateConsoleText();
 }
예제 #10
0
 public virtual void OnMouseWheelMoved(MouseWheelEventArgs E)
 {
 }
예제 #11
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
        /// </summary>
        ///
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e)
        {
            // Only do something when there is a scrollbar
            if (m_Scroll != null)
            {
                if (m_Scroll.LowValue < m_Scroll.Maximum)
                {
                    // Check if you are scrolling down
                    if (e.Delta < 0)
                    {
                        // Scroll down
                        m_Scroll.Value = (int)(m_Scroll.Value + ((-e.Delta) * (m_ItemHeight / 2)));
                    }
                    else // You are scrolling up
                    {
                        int change = (int)((e.Delta) * (m_ItemHeight / 2));

                        // Scroll up
                        if (change < m_Scroll.Value)
                            m_Scroll.Value = m_Scroll.Value - change;
                        else
                            m_Scroll.Value = 0;
                    }
                }
            }
        }
예제 #12
0
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
        /// </summary>
        ///
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e)
        {
            // Only do something when there is a scrollbar
            if (m_Scroll != null)
            {
                if (m_Scroll.LowValue < m_Scroll.Maximum)
                {
                    // Check if you are scrolling down
                    if (e.Delta < 0)
                    {
                        // Scroll down
                        m_Scroll.Value = m_Scroll.Value + (-e.Delta * (int)m_TextSize);
                    }
                    else // You are scrolling up
                    {
                        int change = e.Delta * (int)m_TextSize;

                        // Scroll up
                        if (change < m_Scroll.Value)
                            m_Scroll.Value = m_Scroll.Value - change;
                        else
                            m_Scroll.Value = 0;
                    }

                    UpdateDisplayedText();
                }
            }
        }
예제 #13
0
 public void MouseScrollMove(MouseWheelEventArgs e)
 {
     if(ActiveWindow != null)
         ActiveWindow.MouseScrollMove(e);
     else
     {
         CurrentState.MouseScrollMove(e);
     }
 }
예제 #14
0
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
 /// </summary>
 ///
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e)
 {
     if (Value - e.Delta < 0)
         Value = 0;
     else
         Value = Value - e.Delta;
 }
예제 #15
0
파일: GameBase.cs 프로젝트: Furt/netgore
 /// <summary>
 /// Handles the MouseWheelMoved event of the <see cref="GameBase.RenderWindow"/>.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="SFML.Window.MouseWheelEventArgs"/> instance containing the event data.</param>
 void rw_MouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     if (MouseWheelMoved != null)
         MouseWheelMoved.Raise(this, e);
 }
예제 #16
0
        /// <summary>
        /// Handles mouse wheel movement for the console.
        /// </summary>
        /// <param name="e">The <see cref="MouseWheelEventArgs"/> instance containing the event data.</param>
        public void OnInput(MouseWheelEventArgs e)
        {
            if (e.Delta > 0)
            {
                this.bufferPos++;
            }
            else if (e.Delta < 0)
            {
                this.bufferPos--;
            }

            if (this.bufferPos < 0)
            {
                this.bufferPos = 0;
            }
            else if (this.bufferPos > this.consoleBuffer.Count)
            {
                this.bufferPos = this.consoleBuffer.Count;
            }
        }
예제 #17
0
 /// <summary>
 /// マウス ホイールの回転を処理するハンドラー
 /// </summary>
 /// <param name="sender">ウィンドウ</param>
 /// <param name="e">マウス ホイール イベント</param>
 void OnMouseWheelMovedEventHandler(object sender, MouseWheelEventArgs e)
 {
     if (e.Delta > 0) {
         this.keyBuffer.Add (KeyCode.MouseWheeleUp);
     }
     if (e.Delta < 0) {
         this.keyBuffer.Add (KeyCode.MouseWheeleDown);
     }
     this.wheele += e.Delta;
 }
예제 #18
0
		public override bool MouseWheelMove(MouseWheelEventArgs e)
        {
            Value += ((Math.Sign(e.Y)*-1)*Math.Max(((max/20)), 1));
            return true;
        }
예제 #19
0
		public override bool MouseWheelMove(MouseWheelEventArgs e)
        {
            foreach (var curr in _tabs)
            {
                if (curr.Key.MouseWheelMove(e)) return true;

                if (_activeTab != null)
                    if (_activeTab.MouseWheelMove(e)) return true;
            }
            return base.MouseWheelMove(e);
        }
예제 #20
0
 static void MouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     EventMgr.Notify (Event.MouseWheelMoved, e);
 }
예제 #21
0
 void InputSystem_MouseWheel(object sender, MouseWheelEventArgs e)
 {
     if (screens.Count > 0)
         CurrentScreen.MouseScroll(e.Delta);
 }
예제 #22
0
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     if (ClientArea.Contains(e.X, e.Y))
     {
         if (e.Delta > 0)
         {
             if (Selected + 1 <= _items.Count - 1) Selected++;
             return true;
         }
         else if (e.Delta < 0)
         {
             if (Selected - 1 >= 0) Selected--;
             return true;
         }
     }
     return false;
 }
예제 #23
0
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
 /// </summary>
 ///
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e)
 {
     if (!m_ListBox.Visible)
     {
         // Check if you are scrolling down
         if (e.Delta < 0)
         {
             // select the next item
             if ((uint)(m_ListBox.GetSelectedItemIndex() + 1) < m_ListBox.GetItems().Count)
                 m_ListBox.SetSelectedItem(m_ListBox.GetSelectedItemIndex() + 1);
         }
         else // You are scrolling up
         {
             // select the previous item
             if (m_ListBox.GetSelectedItemIndex() > 0)
                 m_ListBox.SetSelectedItem(m_ListBox.GetSelectedItemIndex()-1);
         }
     }
 }
예제 #24
0
 void window_MouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     renderFrame.scale += ((float)e.Delta) / 10.0f;
     renderFrame.CalcZoom();
     if (currentObject != null)
     {
         if (currentObject is Circle)
         {
             Circle circle = currentObject as Circle;
             circle.center = ToGlobalCoords(Mouse.GetPosition(window));
         }
     }
 }
예제 #25
0
 public void MouseWheelMove ( MouseWheelEventArgs e )
 {
     UserInterfaceManager.MouseWheelMove(e);
 }
예제 #26
0
 internal void updateMouseWheel(object sender, MouseWheelEventArgs e)
 {
     mouseWheelPos += e.Delta;
 }
예제 #27
0
 /// <summary>
 /// Handles mouse wheel input.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The MouseWheelEventArgs instance containing the event data.</param>
 private void MouseWheelMoveEvent(object sender, MouseWheelEventArgs e)
 {
     if (_stateManager != null)
         _stateManager.MouseWheelMove(e);
 }
예제 #28
0
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget
 /// </summary>
 ///
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e)
 {
     e.X -= (int)m_Borders.Left;
     e.Y -= (int)(m_TitleBarHeight + m_Borders.Top);
     base.OnMouseWheelMoved(e);
 }
예제 #29
0
파일: Input.cs 프로젝트: JOCP9733/tank
 void OnMouseWheelMoved(object sender, MouseWheelEventArgs e)
 {
     currentMouseWheelDelta = e.Delta;
 }
예제 #30
0
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     return _inventoryContainer.MouseWheelMove(e);
 }