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); }
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); }
public override IInputListener Focus(Coord pos) { OverlapPaneChild child = GetChild(pos); return(child?.Pane.Focus(pos - child.Offset) ?? this); }