2022-05-08 07:21:18 -04:00
|
|
|
using UnityEditorInternal;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace TriInspectorUnityInternalBridge
|
|
|
|
{
|
|
|
|
internal static class ReorderableListProxy
|
|
|
|
{
|
|
|
|
public static void DoListHeader(ReorderableList list, Rect headerRect)
|
|
|
|
{
|
|
|
|
if (list.showDefaultBackground && Event.current.type == EventType.Repaint)
|
|
|
|
{
|
|
|
|
ReorderableList.defaultBehaviours.DrawHeaderBackground(headerRect);
|
|
|
|
}
|
|
|
|
|
|
|
|
headerRect.xMin += 6f;
|
|
|
|
headerRect.xMax -= 6f;
|
|
|
|
headerRect.height -= 2f;
|
|
|
|
headerRect.y += 1;
|
|
|
|
|
|
|
|
list.drawHeaderCallback?.Invoke(headerRect);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void ClearCacheRecursive(ReorderableList list)
|
|
|
|
{
|
2022-07-02 02:27:26 -04:00
|
|
|
#if UNITY_2021_3_OR_NEWER
|
|
|
|
list.InvalidateCacheRecursive();
|
|
|
|
#elif UNITY_2020_2_OR_NEWER
|
2022-05-08 07:21:18 -04:00
|
|
|
list.ClearCacheRecursive();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|