public override void OnMouseMove(MouseMovedEventHandler handler)
 {
     if (!_isOverScrollbar)
     {
         return;
     }
     _verticalScrollRepresenter.Scroll(handler.Y);
 }
Exemple #2
0
        private void HandleMouseMoved(GuiElement element, MouseState newState, MouseMovedEventHandler handler)
        {
            if (!element.Bounds.Contains(newState.X, newState.Y))
            {
                return;
            }

            HandleMouseMovedForChildren(element, newState, handler);
        }
 public virtual void OnMouseMove(MouseMovedEventHandler handler)
 {
 }
Exemple #4
0
 private void HandleMouseMovedForChildren(GuiElement element, MouseState newState, MouseMovedEventHandler handler)
 {
     foreach (var childElement in element.Children)
     {
         if (childElement.Bounds.Contains(newState.X, newState.Y) && childElement.IsMouseOver)
         {
             childElement.OnMouseMove(handler);
             if (handler.Handled)
             {
                 return;
             }
             HandleMouseMovedForChildren(childElement, newState, handler);
         }
     }
 }