Nez.Portable/UI/Stage.cs
/// <summary>
/// bubbles the onMouseScrolled event from mouseOverElement to all parents until one of them handles it
/// </summary>
/// <returns>The mouse wheel.</returns>
/// <param name="mouseOverElement">Mouse over element.</param>
bubbles the onMouseScrolled event from mouseOverElement to all parents until one of them handles it
bubbles the onMouseScrolled event from mouseOverElement to all parents until one of them handles it
void handleMouseWheel(Element mouseOverElement)
        {
            if (Input.mouseWheelDelta == 0)
                return;
            var listener = mouseOverElement as IInputListener;
            if (listener != null && listener.onMouseScrolled(Input.mouseWheelDelta))
                return;
            while (mouseOverElement.parent != null)
            {
                mouseOverElement = mouseOverElement.parent;
                listener = mouseOverElement as IInputListener;
                if (listener != null && listener.onMouseScrolled(Input.mouseWheelDelta))
                    return;
            }
        }
void handleMouseWheel ( Element mouseOverElement ) { if ( Input . mouseWheelDelta == 0 ) return ; var listener = mouseOverElement as IInputListener ; if ( listener != null && listener . onMouseScrolled ( Input . mouseWheelDelta ) ) return ; while ( mouseOverElement . parent != null ) { mouseOverElement = mouseOverElement . parent ; listener = mouseOverElement as IInputListener ; if ( listener != null && listener . onMouseScrolled ( Input . mouseWheelDelta ) ) return ; } }
bubbles the onMouseScrolled event from mouseOverElement to all parents until one of them handles it
bubbles the onMouseScrolled event from mouseOverElement to all parents until one of them handles it
// bail out if we have no mouse wheel motion // check the deepest Element first then check all of its parents that are IInputListeners
The mouse wheel.
The mouse wheel .
mouseOverElement
Element
Mouse over element.
Mouse over element .