public void OnGUI(Rect rect)
{
Rect rect2;
Rect rect3;
if (s_Styles == null)
{
s_Styles = new Styles();
}
using (new EditorGUI.DisabledScope(this.m_Controller == null))
{
AudioMixerDrawUtils.DrawRegionBg(rect, out rect2, out rect3);
AudioMixerDrawUtils.HeaderLabel(rect2, s_Styles.header, s_Styles.snapshotsIcon);
}
if (this.m_Controller != null)
{
int snapshotIndex = this.GetSnapshotIndex(this.m_Controller.TargetSnapshot);
if (snapshotIndex != this.m_ReorderableListWithRenameAndScrollView.list.index)
{
this.m_ReorderableListWithRenameAndScrollView.list.index = snapshotIndex;
this.m_ReorderableListWithRenameAndScrollView.FrameItem(snapshotIndex);
}
this.m_ReorderableListWithRenameAndScrollView.OnGUI(rect3);
if (GUI.Button(new Rect(rect2.xMax - 15f, rect2.y + 3f, 15f, 15f), s_Styles.addButton, EditorStyles.label))
{
this.Add();
}
}
}