private void ShowEdiorButtonGUI()
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.FlexibleSpace();
bool selectedInParticleSystemWindow = this.selectedInParticleSystemWindow;
GameObject gameObject = (base.target as ParticleSystem).gameObject;
GUIContent hideWindowText = null;
ParticleSystemWindow instance = ParticleSystemWindow.GetInstance();
if (((instance != null) && instance.IsVisible()) && selectedInParticleSystemWindow)
{
if (instance.GetNumTabs() > 1)
{
hideWindowText = this.hideWindowText;
}
else
{
hideWindowText = this.closeWindowText;
}
}
else
{
hideWindowText = this.showWindowText;
}
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(110f) };
if (GUILayout.Button(hideWindowText, EditorStyles.miniButton, options))
{
if (((instance != null) && instance.IsVisible()) && selectedInParticleSystemWindow)
{
if (!instance.ShowNextTabIfPossible())
{
instance.Close();
}
}
else
{
if (!selectedInParticleSystemWindow)
{
ParticleSystemEditorUtils.lockedParticleSystem = null;
Selection.activeGameObject = gameObject;
}
if (instance != null)
{
if (!selectedInParticleSystemWindow)
{
instance.Clear();
}
instance.Focus();
}
else
{
this.Clear();
ParticleSystemWindow.CreateWindow();
GUIUtility.ExitGUI();
}
}
}
GUILayout.EndHorizontal();
}