public static void DrawScrollDropShadow(Rect scrollViewRect, float scrollY, float contentHeight)
{
if ((Event.current.type == EventType.Repaint) && (contentHeight > scrollViewRect.height))
{
Color color = GUI.color;
float a = (scrollY <= 10f) ? (scrollY / 10f) : 1f;
if (a < 1f)
{
GUI.color = new Color(1f, 1f, 1f, a);
}
if (a > 0f)
{
GUI.DrawTexture(new Rect(scrollViewRect.x, scrollViewRect.y, scrollViewRect.width, 20f), styles.scrollShadowTexture);
}
if (a < 1f)
{
GUI.color = color;
}
float num2 = Mathf.Max((float) (contentHeight - scrollViewRect.height), (float) 0f);
float num3 = ((num2 - scrollY) <= 10f) ? ((num2 - scrollY) / 10f) : 1f;
if (num3 < 1f)
{
GUI.color = new Color(1f, 1f, 1f, num3);
}
if (num3 > 0f)
{
GUI.DrawTextureWithTexCoords(new Rect(scrollViewRect.x, scrollViewRect.yMax - 10f, scrollViewRect.width, 10f), styles.scrollShadowTexture, new Rect(1f, 1f, -1f, -1f));
}
if (num3 < 1f)
{
GUI.color = color;
}
}
}