예제 #1
0
        public void Focus()
        {
            if (m_Parrent != null)
            {
                m_Parrent.Focus();
            }

            // make sure none of the children have focus.
            Unfocus();

            // now say that we do
            m_ContainsFocus = true;
        }
예제 #2
0
        public bool SetChildCurrent(T x, T y)
        {
            for (int i = 0; i < m_Children.Count; i++)
            {
                GUIWidget <T> child = m_Children[i];
                if (child.Visible)
                {
                    if (child.InRect(x, y))
                    {
                        if (!child.Focused)
                        {
                            child.Focus();
                            return(true);
                        }

                        return(false);
                    }
                }
            }

            return(false);
        }