예제 #1
0
        /// <summary>
        /// Shows the given control in the inspector, and returns true if this control was shown as a result.
        /// </summary>
        /// <param name="SelectedControl"></param>
        /// <returns></returns>
        public virtual Boolean ShowInInspector(GUIControl SelectedControl)
        {
            if (this == SelectedControl)
            {
                hideFlags = 0;
                return true;
            }

            hideFlags = HideFlags.HideInInspector;
            return false;
        }
예제 #2
0
        public override Boolean ShowInInspector(GUIControl SelectedControl)
        {
            var ChildSelected = false;
            foreach (var Control in Controls)
            {
                if (Control.ShowInInspector(SelectedControl))
                    ChildSelected = true;
            }

            if (ChildSelected)
            {
                hideFlags = 0;
                return true;
            }

            return base.ShowInInspector(SelectedControl);
        }