Example #1
0
 public static void AddCursorRect(Rect position, MouseCursor mouse, int controlID)
 {
     if (Event.current.type == EventType.Repaint)
     {
         Rect rect        = GUIClip.Unclip(position);
         Rect topmostRect = GUIClip.topmostRect;
         Rect r           = Rect.MinMaxRect(Mathf.Max(rect.x, topmostRect.x), Mathf.Max(rect.y, topmostRect.y), Mathf.Min(rect.xMax, topmostRect.xMax), Mathf.Min(rect.yMax, topmostRect.yMax));
         if (r.width <= 0f || r.height <= 0f)
         {
             return;
         }
         EditorGUIUtility.Internal_AddCursorRect(r, mouse, controlID);
     }
 }