public void Focus() { if (parent != null) { parent.Focus(); } // make sure none of the children have focus. Unfocus(); // now say that we do m_ContainsFocus = true; }
public bool SetChildCurrent(double x, double y) { for (int i = 0; i < children.Count; i++) { UIWidget child = children[i]; if (child.Visible) { if (child.InRect(x, y)) { if (!child.Focused) { child.Focus(); return(true); } return(false); } } } return(false); }