internal void DrawUIPane(ProfilerWindow win, ProfilerArea profilerArea, UISystemProfilerChart detailsChart)
{
this.InitIfNeeded(win);
EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
if (this.m_DetachedPreview != null && !this.m_DetachedPreview)
{
this.m_DetachedPreview = null;
}
bool flag = this.m_DetachedPreview;
if (!flag)
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
SplitterGUILayout.BeginHorizontalSplit(this.m_TreePreviewHorizontalSplitState, new GUILayoutOption[0]);
}
Rect controlRect = EditorGUILayout.GetControlRect(new GUILayoutOption[]
{
GUILayout.ExpandWidth(true),
GUILayout.ExpandHeight(true)
});
controlRect.yMin -= EditorGUIUtility.standardVerticalSpacing;
this.m_TreeViewControl.property = win.CreateProperty();
if (!this.m_TreeViewControl.property.frameDataReady)
{
this.m_TreeViewControl.property.Cleanup();
this.m_TreeViewControl.property = null;
GUI.Label(controlRect, UISystemProfiler.Styles.noData);
}
else
{
int activeVisibleFrameIndex = win.GetActiveVisibleFrameIndex();
if (this.m_UGUIProfilerTreeViewState != null && this.m_UGUIProfilerTreeViewState.lastFrame != activeVisibleFrameIndex)
{
this.currentFrame = ProfilerDriver.lastFrameIndex - activeVisibleFrameIndex;
this.m_TreeViewControl.Reload();
}
this.m_TreeViewControl.OnGUI(controlRect);
this.m_TreeViewControl.property.Cleanup();
}
if (!flag)
{
using (new EditorGUILayout.VerticalScope(new GUILayoutOption[0]))
{
using (new EditorGUILayout.HorizontalScope(EditorStyles.toolbar, new GUILayoutOption[]
{
GUILayout.ExpandWidth(true)
}))
{
flag = GUILayout.Button(UISystemProfiler.Styles.contentDetachRender, EditorStyles.toolbarButton, new GUILayoutOption[]
{
GUILayout.Width(75f)
});
if (flag)
{
this.m_DetachedPreview = EditorWindow.GetWindow <UISystemPreviewWindow>();
this.m_DetachedPreview.profiler = this;
this.m_DetachedPreview.Show();
}
UISystemProfiler.DrawPreviewToolbarButtons();
}
this.DrawRenderUI();
}
GUILayout.EndHorizontal();
SplitterGUILayout.EndHorizontalSplit();
EditorGUI.DrawRect(new Rect((float)this.m_TreePreviewHorizontalSplitState.realSizes[0] + controlRect.xMin, controlRect.y, 1f, controlRect.height), UISystemProfiler.Styles.separatorColor);
}
EditorGUILayout.EndVertical();
if (this.m_DetachedPreview)
{
this.m_DetachedPreview.Repaint();
}
}