Beispiel #1
0
        public override void OnMouseMove(Coord last, Coord current)
        {
            OverlapPaneChild fromPane = GetChild(last);
            OverlapPaneChild toPane   = GetChild(current);

            if (fromPane != toPane)
            {
                fromPane?.Pane.OnMouseMove(last - fromPane.Offset, current - fromPane.Offset);
            }

            toPane?.Pane.OnMouseMove(last - toPane.Offset, current - toPane.Offset);
        }
Beispiel #2
0
        private OverlapPaneChild GetChild(Coord pos)
        {
            for (int i = _children.Count - 1; i >= 0; i--)
            {
                OverlapPaneChild child = _children[i];

                if (child.Bounds.Contains(pos))
                {
                    return(child);
                }
            }

            return(null);
        }
Beispiel #3
0
        public override IInputListener Focus(Coord pos)
        {
            OverlapPaneChild child = GetChild(pos);

            return(child?.Pane.Focus(pos - child.Offset) ?? this);
        }