private static bool ThumbnailListItem(Rect rect, bool selected, GUIContent content)
{
EventType type = Event.current.type;
if (type != EventType.MouseDown)
{
if (type != EventType.Repaint)
{
return selected;
}
}
else
{
if (rect.Contains(Event.current.mousePosition))
{
if (!selected)
{
GUI.changed = true;
}
selected = true;
Event.current.Use();
}
return selected;
}
Rect position = new Rect(rect.x + 5f, rect.y + 5f, rect.width - 10f, (rect.height - 20f) - 10f);
s_Styles.thumbnail.Draw(position, content.image, false, false, selected, selected);
s_Styles.thumbnailLabel.Draw(new Rect(rect.x, (rect.y + rect.height) - 20f, rect.width, 20f), content.text, false, false, selected, selected);
return selected;
}