/// <inheritdoc cref="IDrawer.DetectMouseoverForSelfAndChildren" /> public override bool DetectMouseoverForSelfAndChildren(Vector2 mousePosition) { if (ClickToSelectArea.Contains(mousePosition)) { #if DEV_MODE && DEBUG_MOUSEOVER_DETECTION Debug.Log(StringUtils.ToColorizedString("DetectMouseoverForSubjectAndChildren(", subjethisct, "): ", true, "! (via self)")); #endif return(true); } var memberCoordinateSpaceOffset = bodyLastDrawPosition.position - lastDrawPosition.position; return(ParentDrawerUtility.DetectMouseoverForVisibleMembers(this, mousePosition - memberCoordinateSpaceOffset)); }
/// <inheritdoc cref="IDrawer.DetectMouseover" /> public override bool DetectMouseover(Vector2 mousePosition) { if (ClickToSelectArea.Contains(mousePosition)) { #if DEV_MODE && DEBUG_MOUSEOVER_DETECTION Debug.Log(StringUtils.ToColorizedString("DetectMouseover(", this, "): Contains(mousePos): ", true, " with " + visibleMembers.Length + " VisibleMembers...")); #endif if (PrefixResizerMouseovered) { #if DEV_MODE && DEBUG_MOUSEOVER_DETECTION Debug.Log(StringUtils.ToColorizedString("DetectMouseover(", this, "): ", this == unityObject, " because !PrefixResizingEnabledOverControl and PrefixResizerMouseovered")); #endif return(true); } var memberCoordinateSpaceOffset = bodyLastDrawPosition.position - lastDrawPosition.position; if (ParentDrawerUtility.DetectMouseoverForVisibleMembers(this, mousePosition - memberCoordinateSpaceOffset)) { return(false); } #if DEV_MODE && DEBUG_MOUSEOVER_DETECTION Debug.Log(StringUtils.ToColorizedString("DetectMouseover(", this, "): ", true, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")); #endif return(true); } #if DEV_MODE && DEBUG_MOUSEOVER_DETECTION Debug.Log(StringUtils.ToColorizedString("DetectMouseover(", this, "): ", ClickToSelectArea, ".MouseIsOver: ", false)); #endif return(false); }
public override bool DetectMouseover() { var result = base.DetectMouseover(); if (result != tempDebugMouseoverLastValue) { tempDebugMouseoverLastValue = result; Debug.Log(ToString() + " DetectMouseover: " + StringUtils.ToColorizedString(result) + "\nClickToSelectArea.MouseIsOver: " + ClickToSelectArea.MouseIsOver() + "\nIsOutsideViewport: " + InspectorUtility.ActiveInspector.IsOutsideViewport(Bounds) + "\nBounds: " + Bounds + "\nInspectorViewRect: " + DrawGUI.InspectorViewRect + "\nIgnoreMouseInputs: " + InspectorUtility.ActiveInspector.IgnoreViewportMouseInputs()); } return(result); }