/// <inheritdoc cref="IDrawer.OnMouseUpAfterDownOverControl" />
        public override void OnMouseUpAfterDownOverControl(Event inputEvent, bool isClick)
        {
                        #if DEV_MODE && DEBUG_ON_CLICK
            Debug.Log(StringUtils.ToColorizedString(GetType(), ".OnMouseUpAfterDownOverControl(isClick=", isClick, ") with mouseOverHeaderPart=", MouseoveredHeaderPart, ", HeaderMouseovered=", HeaderMouseovered, ", Selectable=", Selectable, ", event=", StringUtils.ToString(inputEvent), ", mousePos=", inputEvent.mousePosition));
                        #endif

            if (isClick && HasEnabledFlag && MouseoveredHeaderPart == HeaderPart.EnabledFlag)
            {
                SelectHeaderPart(MouseoveredHeaderPart);

                if (!Selected)
                {
                    Select(HeaderMouseovered ? ReasonSelectionChanged.PrefixClicked : ReasonSelectionChanged.ControlClicked);
                }

                if (createCustomEnabledFlag)
                {
                    ComponentDrawerUtility.OnCustomEnabledControlClicked(this, inputEvent);

                    OnValidateHandler.CallForTargets(UnityObjects);

                    if (OnValueChanged != null)
                    {
                        OnValueChanged(this, Target);
                    }

                    if (parent != null)
                    {
                        parent.OnMemberValueChanged(Array.IndexOf(parent.Members, this), Target, null);
                    }
                }
                else
                {
                    OnNextLayout(() =>
                    {
                        OnValidateHandler.CallForTargets(UnityObjects);

                        if (OnValueChanged != null)
                        {
                            OnValueChanged(this, Target);
                        }

                        if (parent != null)
                        {
                            parent.OnMemberValueChanged(Array.IndexOf(parent.Members, this), Target, null);
                        }
                    });
                }

                //if using built in enabled flag
                //don't consume click event so that it will cause
                //the enabled state of the component to change
                return;
            }

            base.OnMouseUpAfterDownOverControl(inputEvent, isClick);
        }
 /// <inheritdoc/>
 protected override void DrawHeaderParts()
 {
     if (createCustomEnabledFlag)
     {
         var behaviour = Target as Behaviour;
         if (behaviour != null)
         {
             ComponentDrawerUtility.DrawCustomEnabledField(this, EnabledFlagPosition);
         }
     }
     base.DrawHeaderParts();
 }
        /// <summary>
        /// called when the left mouse button is released
        /// if it was pressed down while being over this
        /// </summary>
        public override void OnMouseUpAfterDownOverControl(Event inputEvent, bool isClick)
        {
            if (isClick && HasEnabledFlag && MouseoveredHeaderPart == HeaderPart.EnabledFlag)
            {
                SelectHeaderPart(MouseoveredHeaderPart);

                if (!Selected)
                {
                    Select(HeaderMouseovered ? ReasonSelectionChanged.PrefixClicked : ReasonSelectionChanged.ControlClicked);
                }

                if (createCustomEnabledFlag)
                {
                    ComponentDrawerUtility.OnCustomEnabledControlClicked(this, inputEvent);

                    OnValidateHandler.CallForTargets(UnityObjects);

                    if (OnValueChanged != null)
                    {
                        OnValueChanged(this, Target);
                    }

                    if (parent != null)
                    {
                        parent.OnMemberValueChanged(Array.IndexOf(parent.Members, this), Target, null);
                    }
                }
                else
                {
                    OnNextLayout(() =>
                    {
                        OnValidateHandler.CallForTargets(UnityObjects);

                        if (OnValueChanged != null)
                        {
                            OnValueChanged(this, Target);
                        }

                        if (parent != null)
                        {
                            parent.OnMemberValueChanged(Array.IndexOf(parent.Members, this), Target, null);
                        }
                    });
                }

                //if using built in enabled flag
                //don't consume click event so that it will cause
                //the enabled state of the component to change
                return;
            }

            base.OnMouseUpAfterDownOverControl(inputEvent, isClick);
        }
 /// <inheritdoc cref="IDrawer.Duplicate" />
 public override void Duplicate()
 {
     ComponentDrawerUtility.Duplicate(targets);
 }
 /// <inheritdoc cref="IDrawer.SelectNextComponent" />
 public override void SelectNextComponent()
 {
     ComponentDrawerUtility.SelectNextVisibleComponent(this);
 }
 /// <inheritdoc cref="IDrawer.SelectPreviousComponent" />
 public override void SelectPreviousComponent()
 {
     ComponentDrawerUtility.SelectPreviousVisibleComponent(this);
 }
 /// <inheritdoc />
 protected override void NameByType()
 {
     ComponentDrawerUtility.NameByType(this);
 }
 /// <inheritdoc cref="IDrawer.SelectNextOfType" />
 public override void SelectNextOfType()
 {
     ComponentDrawerUtility.SelectNextOfType(this);
 }
 /// <inheritdoc cref="IDrawer.SelectPreviousOfType" />
 public override void SelectPreviousOfType()
 {
     ComponentDrawerUtility.SelectPreviousOfType(this);
 }