Beispiel #1
0
        void Device_MouseInput(object sender, MouseInputEventArgs e)
        {
            /*
            if ((e.ButtonFlags & MouseButtonFlags.LeftDown) == MouseButtonFlags.LeftDown)
                ButtonPressed(0);
            else if ((e.ButtonFlags & MouseButtonFlags.LeftUp) == MouseButtonFlags.LeftUp)
                ButtonReleased(0);

            if ((e.ButtonFlags & MouseButtonFlags.RightDown) == MouseButtonFlags.RightDown)
                ButtonPressed(1);
            else if ((e.ButtonFlags & MouseButtonFlags.RightUp) == MouseButtonFlags.RightUp)
                ButtonReleased(1);

            if ((e.ButtonFlags & MouseButtonFlags.MiddleDown) == MouseButtonFlags.MiddleDown)
                ButtonPressed(2);
            else if ((e.ButtonFlags & MouseButtonFlags.MiddleUp) == MouseButtonFlags.MiddleUp)
                ButtonReleased(2);

            if ((e.ButtonFlags & MouseButtonFlags.Button4Down) == MouseButtonFlags.Button4Down)
                ButtonPressed(3);
            else if ((e.ButtonFlags & MouseButtonFlags.Button4Up) == MouseButtonFlags.Button4Up)
               ButtonReleased(3);

            if ((e.ButtonFlags & MouseButtonFlags.Button5Down) == MouseButtonFlags.Button5Down)
                ButtonPressed(4);
            else if ((e.ButtonFlags & MouseButtonFlags.Button5Up) == MouseButtonFlags.Button5Up)
                ButtonReleased(4);
            */

            mousePos.X += e.X;
            mousePos.Y += e.Y;
        }
 public void UpdateInput(object sender, MouseInputEventArgs e)
 {
     if (MouseMode != e.Mode)
         e.Mode = MouseMode;
     X -= e.X;
     Y -= e.Y;
     WheelDelta += e.WheelDelta;
     if (e.ButtonFlags == MouseButtonFlags.LeftDown)
         LeftButton = ButtonState.Pressed;
     if (e.ButtonFlags == MouseButtonFlags.LeftUp)
         LeftButton = ButtonState.Released;
     if (e.ButtonFlags == MouseButtonFlags.RightDown)
         RightButton = ButtonState.Pressed;
     if (e.ButtonFlags == MouseButtonFlags.RightUp)
         RightButton = ButtonState.Released;
     if (e.ButtonFlags == MouseButtonFlags.MiddleDown)
         MiddleButton = ButtonState.Pressed;
     if (e.ButtonFlags == MouseButtonFlags.MiddleUp)
         MiddleButton = ButtonState.Released;
     if (e.ButtonFlags == MouseButtonFlags.Button4Down)
         Button4 = ButtonState.Pressed;
     if (e.ButtonFlags == MouseButtonFlags.Button4Up)
         Button4 = ButtonState.Released;
     if (e.ButtonFlags == MouseButtonFlags.Button5Down)
         Button5 = ButtonState.Pressed;
     if (e.ButtonFlags == MouseButtonFlags.Button5Up)
         Button5 = ButtonState.Released;
 }
Beispiel #3
0
 public override void MouseMove(MouseInputEventArgs e)
 {
     if (disposing || !IsVisible())
     {
         return;
     }
     base.MouseMove(e);
 }
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (_inventoryContainer.MouseDown(e))
     {
         return(true);
     }
     return(false);
 }
Beispiel #5
0
 public override bool MouseWheelMove(MouseInputEventArgs e)
 {
     if (base.MouseWheelMove(e))
     {
         return(true);
     }
     return(false);
 }
Beispiel #6
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         return(true);
     }
     return(false);
 }
Beispiel #7
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         return(_targetArea.MouseDown(e));
     }
     return(false);
 }
Beispiel #8
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
     {
         return true;
     }
     return false;
 }
Beispiel #9
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (disposing || !IsVisible())
     {
         return(false);
     }
     return(base.MouseUp(e));
 }
Beispiel #10
0
 void mouse_MouseInput(object sender, MouseInputEventArgs e)
 {
     buttonsLabel.Text    = Enum.Format(typeof(MouseButtonFlags), e.ButtonFlags, "G");
     extraLabel.Text      = e.ExtraInformation.ToString(CultureInfo.CurrentCulture);
     rawButtonsLabel.Text = e.RawButtons.ToString(CultureInfo.CurrentCulture);
     locationLabel.Text   = new Point(e.X, e.Y).ToString();
     stateLabel.Text      = Enum.Format(typeof(MouseMode), e.Mode, "G");
     wheelLabel.Text      = e.WheelDelta.ToString(CultureInfo.CurrentCulture);
 }
Beispiel #11
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
     {
         if (Clicked != null) Clicked(this);
         return true;
     }
     return false;
 }
Beispiel #12
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         ResetEntity();
         return(true);
     }
     return(false);
 }
Beispiel #13
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
     {
         ResetEntity();
         return true;
     }
     return false;
 }
Beispiel #14
0
 void mouse_MouseInput(object sender, MouseInputEventArgs e)
 {
     buttonsLabel.Text = Enum.Format(typeof(MouseButtonFlags), e.ButtonFlags, "G");
     extraLabel.Text = e.ExtraInformation.ToString(CultureInfo.CurrentCulture);
     rawButtonsLabel.Text = e.RawButtons.ToString(CultureInfo.CurrentCulture);
     locationLabel.Text = new Point(e.X, e.Y).ToString();
     stateLabel.Text = Enum.Format(typeof(MouseMode), e.Mode, "G");
     wheelLabel.Text = e.WheelDelta.ToString(CultureInfo.CurrentCulture);
 }
Beispiel #15
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     foreach (ContextMenuButton button in _buttons)
     {
         button.MouseUp(e);
     }
     Dispose();
     return(false);
 }
Beispiel #16
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (dragging)
     {
         dragging = false;
         return(true);
     }
     return(false);
 }
Beispiel #17
0
 private void Device_MouseInput(object sender, MouseInputEventArgs e)
 {
     //var p = EngineRef.MousePosition;
     //MousePositionLocal = new Vector2(p.X, p.Y);
     MouseOffset = new Vector2(e.X, e.Y);
     MouseEvent?.Invoke(new MouseMoveEventArgs()
     {
         Position = Vector2.Zero, Offset = MouseOffset
     });
 }
Beispiel #18
0
 internal void _onMouseUp(MouseInputEventArgs e)
 {
     if (initialized)
     {
         if (!e.IsLeftButtonDown)
         {
             webView.InjectMouseUp(MouseButton.Left);
         }
     }
 }
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (!base.MouseDown(e))
         if (input.MouseDown(e))
         {
             IoCManager.Resolve<IUserInterfaceManager>().SetFocus(input);
             return true;
         }
     return false;
 }
Beispiel #20
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)) &&
         IoCManager.Resolve<IUserInterfaceManager>().DragInfo.IsActive)
     {
         if (Dropped != null) Dropped(this);
         return true;
     }
     return false;
 }
Beispiel #21
0
 public override bool MouseWheelMove(MouseInputEventArgs e)
 {
     if (_currentTab == 1 || _currentTab == 3)
     {
         if (_inventory.MouseWheelMove(e))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #22
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     foreach (GuiComponent comp in slots)
     {
         if (comp.MouseUp(e))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #23
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         if (Selected != null)
         {
             Selected(this);
         }
     }
     return(true);
 }
Beispiel #24
0
 public override void MouseMove(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         _color = Color.LightSteelBlue;
     }
     else
     {
         _color = Color.White;
     }
 }
Beispiel #25
0
        public override bool MouseDown(MouseInputEventArgs e)
        {
            var mousePoint = new Vector2D((int)e.Position.X, (int)e.Position.Y);

            if ((mousePoint - new Vector2D(Position.X, Position.Y)).Length <= 3)
            {
                dragging = true;
            }

            return(false);
        }
Beispiel #26
0
 public override bool MouseWheelMove(MouseInputEventArgs e)
 {
     if (!base.MouseWheelMove(e))
     {
         return(input.MouseWheelMove(e));
     }
     else
     {
         return(false);
     }
 }
Beispiel #27
0
 /// <summary>
 /// マウス入力の受け取り
 /// </summary>
 protected override void MouseInput(object sender, MouseInputEventArgs e)
 {
     if (e.WheelDelta > 0)
     {
         zooming += 0.1f;
     }
     else if (e.WheelDelta < 0)
     {
         zooming -= 0.1f;
     }
 }
Beispiel #28
0
 public void Input_MouseDown(object sender, MouseInputEventArgs e)
 {
     if (e.IsRightButtonDown || e.IsMiddleButtonDown)
     {
         enableDragging = true;
         startPoint.X   = e.X;
         startPoint.Y   = e.Y;
         deltaPoint.X   = startPoint.X;
         deltaPoint.Y   = startPoint.Y;
     }
 }
Beispiel #29
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (!Available) return false;
     if (_buttonArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
     {
         if (Clicked != null) Clicked(this);
         Selected = true;
         return true;
     }
     return false;
 }
        private void MouseInput(Object sender, MouseInputEventArgs e)
        {
            MouseButtonFlags flags = e.ButtonFlags;

            if ((flags & MouseButtonFlags.LeftDown) == MouseButtonFlags.LeftDown)
            {
                _left = ButtonState.Pressed;
            }
            else if ((flags & MouseButtonFlags.LeftUp) == MouseButtonFlags.LeftUp)
            {
                _left = ButtonState.Released;
            }

            if ((flags & MouseButtonFlags.RightDown) == MouseButtonFlags.RightDown)
            {
                _right = ButtonState.Pressed;
            }
            else if ((flags & MouseButtonFlags.RightUp) == MouseButtonFlags.RightUp)
            {
                _right = ButtonState.Released;
            }

            if ((flags & MouseButtonFlags.MiddleDown) == MouseButtonFlags.MiddleDown)
            {
                _middle = ButtonState.Pressed;
            }
            else if ((flags & MouseButtonFlags.MiddleUp) == MouseButtonFlags.MiddleUp)
            {
                _middle = ButtonState.Released;
            }

            if ((flags & MouseButtonFlags.Button4Down) == MouseButtonFlags.Button4Down)
            {
                _x1 = ButtonState.Pressed;
            }
            else if ((flags & MouseButtonFlags.Button4Up) == MouseButtonFlags.Button4Up)
            {
                _x1 = ButtonState.Released;
            }

            if ((flags & MouseButtonFlags.Button5Down) == MouseButtonFlags.Button5Down)
            {
                _x2 = ButtonState.Pressed;
            }
            else if ((flags & MouseButtonFlags.Button5Up) == MouseButtonFlags.Button5Up)
            {
                _x2 = ButtonState.Released;
            }

            _wheelDelta += e.WheelDelta;
            _pos.X      += e.X;
            _pos.Y      += e.Y;
        }
Beispiel #31
0
 public override void MouseMove(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         showTooltip = true;
         tooltipPos  = new Point((int)e.Position.X, (int)e.Position.Y);
     }
     else
     {
         showTooltip = false;
     }
 }
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         if (Clicked != null)
         {
             Clicked(this, associatedTemplate, associatedTemplateName);
         }
         return(true);
     }
     return(false);
 }
Beispiel #33
0
 internal void _onMouseWheel(MouseInputEventArgs e)
 {
     if (!initialized)
     {
         return;
     }
     if (e.X < position.X || e.Y < position.Y || e.X > position.X + descHM.Width || e.Y > position.Y + descHM.Height)
     {
         return;
     }
     e.Handled = true;
     webView.InjectMouseWheel((int)e.WheelDelta, 0);
 }
        public override void MouseMove(MouseInputEventArgs e)
        {
            if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
            {
                _buttonLeft.MouseMove(e);
                _buttonRight.MouseMove(e);

                foreach (var curr in _items)
                {
                    curr.Key.MouseMove(e);
                }
            }
        }
Beispiel #35
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)) &&
         IoCManager.Resolve <IUserInterfaceManager>().DragInfo.IsActive)
     {
         if (Dropped != null)
         {
             Dropped(this);
         }
         return(true);
     }
     return(false);
 }
Beispiel #36
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
     {
         if (_userInterfaceManager.DragInfo.IsEntity && _userInterfaceManager.DragInfo.IsActive)
         {
             SetEntity(_userInterfaceManager.DragInfo.DragEntity);
             _userInterfaceManager.DragInfo.Reset();
             return true;
         }
     }
     return false;
 }
Beispiel #37
0
        public override void MouseMove(MouseInputEventArgs e)
        {
            foreach (var curr in _tabs)
            {
                curr.Key.MouseMove(e);

                if (_activeTab != null)
                {
                    _activeTab.MouseMove(e);
                }
            }
            base.MouseMove(e);
        }
Beispiel #38
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
     {
         if (_userInterfaceManager.DragInfo.IsEntity && _userInterfaceManager.DragInfo.IsActive)
         {
             SetEntity(_userInterfaceManager.DragInfo.DragEntity);
             _userInterfaceManager.DragInfo.Reset();
             return(true);
         }
     }
     return(false);
 }
        public override bool MouseDown(MouseInputEventArgs e)
        {
            if (ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
            {
                if (ShowArrows && ScrollingNeeded())
                {
                    if (_buttonLeft.MouseDown(e))
                    {
                        return(true);
                    }
                    if (_buttonRight.MouseDown(e))
                    {
                        return(true);
                    }
                }

                if (_items.Count > 0)
                {
                    if (ScrollOffset >= 0 || ScrollOffset <= _items.Count - 1)
                    {
                        KeyValuePair <ImageButton, Object> selected = _items[ScrollOffset];
                        if (selected.Key.MouseDown(e))
                        {
                            return(true);
                        }

                        for (int i = 1; i <= AdditionalColumns; i++)
                        {
                            if ((ScrollOffset - i) >= 0 && (ScrollOffset - i) <= _items.Count - 1)
                            {
                                KeyValuePair <ImageButton, Object> selectedLeft = _items[(ScrollOffset - i)];
                                if (selectedLeft.Key.MouseDown(e))
                                {
                                    return(true);
                                }
                            }

                            if ((ScrollOffset + i) >= 0 && (ScrollOffset + i) <= _items.Count - 1)
                            {
                                KeyValuePair <ImageButton, Object> selectedRight = _items[(ScrollOffset + i)];
                                if (selectedRight.Key.MouseDown(e))
                                {
                                    return(true);
                                }
                            }
                        }
                    }
                }
            }
            return(false);
        }
Beispiel #40
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (!IsVisible()) return false;
     if (clientAreaButton.Contains((int) e.Position.X, (int) e.Position.Y))
     {
         dragging = true;
         return true;
     }
     else if (ClientArea.Contains((int) e.Position.X, (int) e.Position.Y))
     {
         return true;
     }
     return false;
 }
Beispiel #41
0
        public void Device_MouseInput(object sender, MouseInputEventArgs e)
        {
            MousePoint = form.PointToClient(Cursor.Position);
            _mouseDelta.X = e.X;
            _mouseDelta.Y = e.Y;
            MouseWheelDelta = e.WheelDelta;

            if (e.ButtonFlags == MouseButtonFlags.None)
                return;

            MouseButtonFlags mouseFlags = e.ButtonFlags;

            // Don't consider mouse clicks outside of the client area
            if (form.Focused == false || form.ClientRectangle.Contains(MousePoint) == false)
                mouseFlags &= ~(MouseButtonFlags.LeftDown | MouseButtonFlags.RightDown);

            // Find the pressed/unpressed keys
            if (mouseFlags == MouseButtonFlags.LeftDown)
            {
                if ((MouseDown & MouseButtonFlags.LeftDown) != MouseButtonFlags.LeftDown)
                {
                    MouseDown |= MouseButtonFlags.LeftDown;
                    MousePressed |= MouseButtonFlags.LeftDown;
                }
            }
            else if (mouseFlags == MouseButtonFlags.LeftUp)
            {
                MouseDown &= ~MouseButtonFlags.LeftDown;
                MousePressed |= MouseButtonFlags.LeftUp;
            }

            if (mouseFlags == MouseButtonFlags.RightDown)
            {
                if ((MouseDown & MouseButtonFlags.RightDown) != MouseButtonFlags.RightDown)
                {
                    MouseDown |= MouseButtonFlags.RightDown;
                    MousePressed |= MouseButtonFlags.RightDown;
                }
            }
            else if (mouseFlags == MouseButtonFlags.RightUp)
            {
                MouseDown &= ~MouseButtonFlags.RightDown;
                MousePressed |= MouseButtonFlags.RightUp;
            }
        }
Beispiel #42
0
        public override bool MouseDown(MouseInputEventArgs e)
        {
            if (disposing || !IsVisible()) return false;

            if (closeButton.MouseDown(e)) return true;

            if (base.MouseDown(e)) return true;

            if (titleArea.Contains((int) e.Position.X, (int) e.Position.Y))
            {
                draggingOffset.X = (int) e.Position.X - Position.X;
                draggingOffset.Y = (int) e.Position.Y - Position.Y;
                dragging = true;
                return true;
            }

            return false;
        }
Beispiel #43
0
 public void MouseEventHandle(object sender, MouseInputEventArgs e)
 {
     mouseDelta.X += e.X;
     mouseDelta.Y += e.Y;
 }
        public override bool MouseWheelMove(MouseInputEventArgs e)
        {
            var modArgs = new MouseInputEventArgs
                (e.Buttons,
                 e.ShiftButtons,
                 new Vector2D(e.Position.X - Position.X + scrollbarH.Value, e.Position.Y - Position.Y + scrollbarV.Value),
                 e.WheelPosition,
                 e.RelativePosition,
                 e.WheelDelta,
                 e.ClickCount);

            if (inner_focus != null)
            {
                if (inner_focus.MouseWheelMove(modArgs))
                    return true;
                else if (scrollbarV.IsVisible() && ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
                {
                    scrollbarV.MouseWheelMove(e);
                    return true;
                }
            }
            else if (scrollbarV.IsVisible() && ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
            {
                scrollbarV.MouseWheelMove(e);
                return true;
            }
            return false;
        }
 public override bool MouseWheelMove(MouseInputEventArgs e)
 {
     if (base.MouseWheelMove(e)) return true;
     return false;
 }
Beispiel #46
0
 public override bool MouseWheelMove(MouseInputEventArgs e)
 {
     if (!base.MouseWheelMove(e))
         return input.MouseWheelMove(e);
     else return false;
 }
Beispiel #47
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (!base.MouseDown(e))
         if (input.MouseDown(e))
         {
             IoCManager.Resolve<IUserInterfaceManager>().SetFocus(input);
             return true;
         }
     return false;
 }
Beispiel #48
0
 public override void MouseMove(MouseInputEventArgs e)
 {
     _dropDown.MouseMove(e);
 }
Beispiel #49
0
 public override bool MouseUp(MouseInputEventArgs e)
 {
     return _dropDown.MouseUp(e);
 }
Beispiel #50
0
        public override bool MouseDown(MouseInputEventArgs e)
        {
            if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
                //change to clientAreaRight when theres a proper skin with an arrow to the right.
            {
                var UiMgr = IoCManager.Resolve<IUserInterfaceManager>();
                _dropDown.ToggleVisible();
                if (_dropDown.IsVisible()) UiMgr.SetFocus(_dropDown);
                return true;
            }

            return _dropDown.MouseDown(e);
        }
Beispiel #51
0
 private void NewEntryClicked(Label sender, MouseInputEventArgs e)
 {
     SetItem(sender, true);
 }
Beispiel #52
0
 public void MouseDown(MouseInputEventArgs e)
 {
     UserInterfaceManager.MouseDown(e);
 }
Beispiel #53
0
 public void MouseWheelMove(MouseInputEventArgs e)
 {
     UserInterfaceManager.MouseWheelMove(e);
 }
Beispiel #54
0
 private void ClearLabelClicked(Label sender, MouseInputEventArgs e)
 {
     _clearLabel.BackgroundColor = Color.Gray;
     BuildEntityList();
 }
Beispiel #55
0
 public override void MouseMove(MouseInputEventArgs e)
 {
     base.MouseMove(e);
     input.MouseMove(e);
 }
Beispiel #56
0
 public override bool MouseDown(MouseInputEventArgs e)
 {
     if (disposing || !IsVisible()) return false;
     return base.MouseDown(e);
 }
 public override void MouseMove(MouseInputEventArgs e)
 {
     if (disposing || !IsVisible()) return;
     base.MouseMove(e);
 }
        public override bool MouseDown(MouseInputEventArgs e)
        {
            if (disposing || !IsVisible()) return false;

            if (scrollbarH.MouseDown(e))
            {
                SetFocus(scrollbarH);
                return true;
            }
            if (scrollbarV.MouseDown(e))
            {
                SetFocus(scrollbarV);
                return true;
            }

            if (ClientArea.Contains(new Point((int) e.Position.X, (int) e.Position.Y)))
            {
                var modArgs = new MouseInputEventArgs
                    (e.Buttons,
                     e.ShiftButtons,
                     new Vector2D(e.Position.X - Position.X + scrollbarH.Value,
                                  e.Position.Y - Position.Y + scrollbarV.Value),
                     e.WheelPosition,
                     e.RelativePosition,
                     e.WheelDelta,
                     e.ClickCount);

                foreach (GuiComponent component in components)
                {
                    if (component.MouseDown(modArgs))
                    {
                        SetFocus(component);
                        return true;
                    }
                }
                return true;
            }

            return false;
        }
 public override bool MouseUp(MouseInputEventArgs e)
 {
     if (disposing || !IsVisible()) return false;
     if (base.MouseUp(e)) return true;
     return false;
 }
        public override void MouseMove(MouseInputEventArgs e)
        {
            if (disposing || !IsVisible()) return;
            scrollbarH.MouseMove(e);
            scrollbarV.MouseMove(e);

            var modArgs = new MouseInputEventArgs
                (e.Buttons,
                 e.ShiftButtons,
                 new Vector2D(e.Position.X - Position.X + scrollbarH.Value, e.Position.Y - Position.Y + scrollbarV.Value),
                 e.WheelPosition,
                 e.RelativePosition,
                 e.WheelDelta,
                 e.ClickCount);

            foreach (GuiComponent component in components)
                component.MouseMove(modArgs);

            return;
        }