private void WebLikeHistory(bool hasFocus)
{
if (this.m_Changesets == null)
{
this.m_Changesets = new Changeset[0];
}
if (this.m_GUIItems != null)
{
this.m_HistoryControlID = GUIUtility.GetControlID(ms_HistoryControlHash, FocusType.Passive);
this.HandleWebLikeKeyboard();
Event current = Event.current;
if (current.GetTypeForControl(this.m_HistoryControlID) == EventType.ValidateCommand)
{
current.Use();
}
else
{
GUILayout.Space(1f);
this.m_ScrollPos = GUILayout.BeginScrollView(this.m_ScrollPos, new GUILayoutOption[0]);
int num = 0;
GUILayoutUtility.GetRect(1f, (float) (this.m_TotalHeight - 1));
if ((((current.type == EventType.Repaint) || (current.type == EventType.MouseDown)) || (current.type == EventType.MouseUp)) && (this.m_GUIItems != null))
{
for (int i = 0; i < this.m_Changesets.Length; i++)
{
if (this.m_GUIItems[i].inFilter)
{
if (((num + this.m_GUIItems[i].height) > GUIClip.visibleRect.y) && (num < GUIClip.visibleRect.yMax))
{
Rect rect;
float num3 = ms_Style.descriptionLabel.CalcHeight(this.m_GUIItems[i].colDescription, float.MaxValue);
if (current.type == EventType.Repaint)
{
if ((this.ChangeLogSelectionRev == this.m_Changesets[i].changeset) && (Event.current.type == EventType.Repaint))
{
rect = new Rect(0f, (float) num, GUIClip.visibleRect.width, (float) (this.m_GUIItems[i].height - 10));
ms_Style.selected.Draw(rect, false, false, false, false);
}
rect = new Rect(0f, (float) (num + 3), GUIClip.visibleRect.width, (float) this.m_GUIItems[i].height);
GUI.Label(rect, this.m_GUIItems[i].colAuthor, ms_Style.boldLabel);
rect = new Rect(GUIClip.visibleRect.width - 160f, (float) (num + 3), 60f, (float) this.m_GUIItems[i].height);
GUI.Label(rect, this.m_GUIItems[i].colRevision, ms_Style.boldLabel);
rect.x += 60f;
rect.width = 100f;
GUI.Label(rect, this.m_GUIItems[i].colDate, ms_Style.boldLabel);
rect.x = ms_Style.boldLabel.margin.left;
rect.y += this.m_RowHeight;
rect.width = GUIClip.visibleRect.width;
rect.height = num3;
GUI.Label(rect, this.m_GUIItems[i].colDescription, ms_Style.descriptionLabel);
rect.y += num3;
}
rect = new Rect(0f, (num + num3) + this.m_RowHeight, GUIClip.visibleRect.width, (this.m_GUIItems[i].height - num3) - this.m_RowHeight);
this.DrawParentView(rect, ref this.m_GUIItems[i], i, hasFocus);
if (current.type == EventType.MouseDown)
{
rect = new Rect(0f, (float) num, GUIClip.visibleRect.width, (float) (this.m_GUIItems[i].height - 10));
if (rect.Contains(current.mousePosition))
{
this.ChangeLogSelectionRev = this.m_Changesets[i].changeset;
this.m_ChangesetSelectionIndex = i;
GUIUtility.keyboardControl = this.m_HistoryControlID;
((ASMainWindow) this.m_ParentWindow).m_SearchToShow = ASMainWindow.ShowSearchField.HistoryList;
if (current.button == 1)
{
GUIUtility.hotControl = 0;
rect = new Rect(current.mousePosition.x, current.mousePosition.y, 1f, 1f);
EditorUtility.DisplayCustomMenu(rect, this.m_DropDownChangesetMenuItems, -1, new EditorUtility.SelectMenuItemFunction(this.ChangesetContextMenuClick), null);
Event.current.Use();
}
this.DoScroll();
current.Use();
}
}
}
num += this.m_GUIItems[i].height;
}
}
}
else if (this.m_GUIItems == null)
{
GUILayout.Label(EditorGUIUtility.TextContent("This item is not yet committed to the Asset Server"), new GUILayoutOption[0]);
}
if (Event.current.type == EventType.Repaint)
{
this.m_ScrollViewHeight = (int) GUIClip.visibleRect.height;
}
GUILayout.EndScrollView();
}
}
}