/// <inheritdoc /> public override void OnMouseover() { #if DEV_MODE && PI_ASSERTATIONS Debug.Assert(Clickable); #endif if (MouseOverPart == PrefixedControlPart.Control) { if (!ReadOnly) { DrawGUI.DrawMouseoverEffect(ControlPosition, localDrawAreaOffset); } } else if (MouseOverPart == PrefixedControlPart.Prefix) { if (InspectorUtility.Preferences.mouseoverEffects.prefixLabel) { DrawGUI.DrawLeftClickAreaMouseoverEffect(PrefixLabelPosition, localDrawAreaOffset); } if (IsReorderable) { DrawGUI.Active.SetCursor(MouseCursor.MoveArrow); } } }
/// <inheritdoc /> public override void OnMouseover() { var objFieldRect = ColorRectPosition; if (objFieldRect.Contains(Cursor.LocalPosition)) { DrawGUI.DrawMouseoverEffect(objFieldRect, localDrawAreaOffset); } else if (InspectorUtility.Preferences.mouseoverEffects.prefixLabel && MouseOverPart == PrefixedControlPart.Prefix) { DrawGUI.DrawLeftClickAreaMouseoverEffect(PrefixLabelPosition, localDrawAreaOffset); } }
/// <inheritdoc /> public sealed override void OnMouseover() { if (mouseoveredSubPart == SliderSubPart.Slider) { OnMouseoverSlider(); } else if (mouseoveredSubPart == SliderSubPart.NumberField) { if (HasNumberField) { DrawGUI.DrawMouseoverEffect(NumberFieldPosition, localDrawAreaOffset); } var valueString = StringUtils.ToString(Value); if (valueString.Length > 6) { var tooltip = GUIContentPool.Create(valueString); var tooltipRect = labelLastDrawPosition; tooltipRect.y += 1f; tooltipRect.height -= 2f; var tooltipWidth = DrawGUI.prefixLabel.CalcSize(tooltip).x + 3f; tooltipRect.x = controlLastDrawPosition.x - tooltipWidth - DrawGUI.MiddlePadding - DrawGUI.MiddlePadding; tooltipRect.width = tooltipWidth; DrawGUI.Active.TooltipBox(tooltipRect, tooltip); GUIContentPool.Dispose(ref tooltip); } } else if (MouseOverPart == PrefixedControlPart.Prefix) { if (InspectorUtility.Preferences.mouseoverEffects.prefixLabel) { DrawGUI.DrawLeftClickAreaMouseoverEffect(PrefixLabelPosition, localDrawAreaOffset); } if (!ReadOnly) { DrawGUI.Active.SetCursor(MouseCursor.SlideArrow); if (HasNumberField) { //UPDATE: highlight the control even when mouseovering the prefix //to make it clear than dragging will change the value of that field DrawGUI.DrawMouseoverEffect(NumberFieldPosition, localDrawAreaOffset); } } } }
/// <inheritdoc/> public override void OnMouseover() { if (mouseIsOverButton) { DrawGUI.DrawMouseoverEffect(buttonRect, localDrawAreaOffset); DrawGUI.Active.SetCursor(MouseCursor.Link); } else if (preferences.mouseoverEffects.prefixLabel) { var rect = labelLastDrawPosition; rect.y += 1f; rect.height -= 2f; DrawGUI.DrawLeftClickAreaMouseoverEffect(rect, localDrawAreaOffset); } }
/// <inheritdoc cref="IDrawer.OnMouseover" /> public override void OnMouseover() { #if DEV_MODE && PI_ASSERTATIONS if (!Clickable || !ShouldShowInInspector) { Debug.LogError(StringUtils.ToColorizedString( ToString(), ".OnMouseover called with Clickable=", Clickable, ", ShowInInspector=", ShouldShowInInspector)); } #endif if (MouseOverPart == PrefixedControlPart.Prefix) { if (InspectorUtility.Preferences.mouseoverEffects.prefixLabel) { DrawGUI.DrawLeftClickAreaMouseoverEffect(PrefixLabelPosition, localDrawAreaOffset); } if (IsReorderable) { DrawGUI.Active.SetCursor(MouseCursor.MoveArrow); return; } if (!ReadOnly) { DrawGUI.Active.SetCursor(MouseCursor.SlideArrow); // highlight the control when mouseovering the prefix // to make it clear that dragging will change the value of that field DrawGUI.DrawMouseoverEffect(ControlPosition, Inspector.Preferences.theme.CanDragPrefixToAdjustValueTint, localDrawAreaOffset); } return; } if (MouseOverPart == PrefixedControlPart.Control && !ReadOnly) { //UPDATE: Don't tint the text field on mouseover when it's being edited if (SelectedAndInspectorHasFocus && DrawGUI.EditingTextField) { return; } DrawGUI.DrawMouseoverEffect(ControlPosition, localDrawAreaOffset); } }
/// <inheritdoc/> public override void OnMouseover() { #if DEV_MODE if (DrawGUI.IsUnityObjectDrag) { Debug.Log("OnMouseover with IsUnityObjectDrag=true, IsDrag=" + Inspector.Manager.MouseDownInfo.IsDrag()); } #endif if (InspectorUtility.Preferences.mouseoverEffects.unityObjectHeader) { var rect = lastDrawPosition; rect.height = Height; rect.y += 1f; rect.height -= 2f; rect.width -= 1f; DrawGUI.DrawLeftClickAreaMouseoverEffect(rect, localDrawAreaOffset); } }
/// <inheritdoc /> public override void OnMouseover() { if (mouseIsOverGetButton) { DrawGUI.DrawMouseoverEffect(getButtonRect, localDrawAreaOffset); DrawGUI.Active.AddCursorRect(getButtonRect, MouseCursor.Link); } else if (mouseIsOverSetButton) { DrawGUI.DrawMouseoverEffect(setButtonRect, localDrawAreaOffset); DrawGUI.Active.AddCursorRect(setButtonRect, MouseCursor.Link); } else if (InspectorUtility.Preferences.mouseoverEffects.prefixLabel) { var rect = labelLastDrawPosition; rect.y += 1f; rect.height -= 2f; DrawGUI.DrawLeftClickAreaMouseoverEffect(rect, localDrawAreaOffset); } }