private void DoPlayButtons(bool isOrWillEnterPlaymode)
{
bool isPlaying = EditorApplication.isPlaying;
GUI.changed = false;
int num = (!isPlaying) ? 0 : 4;
if (AnimationMode.InAnimationMode())
{
num = 8;
}
Color color = GUI.color + new Color(0.01f, 0.01f, 0.01f, 0.01f);
GUI.contentColor = new Color(1f / color.r, 1f / color.g, 1f / color.g, 1f / color.a);
GUILayout.Toggle(isOrWillEnterPlaymode, Toolbar.s_PlayIcons[num], "CommandLeft", new GUILayoutOption[0]);
GUI.backgroundColor = Color.white;
if (GUI.changed)
{
Toolbar.TogglePlaying();
GUIUtility.ExitGUI();
}
GUI.changed = false;
bool isPaused = GUILayout.Toggle(EditorApplication.isPaused, Toolbar.s_PlayIcons[num + 1], "CommandMid", new GUILayoutOption[0]);
if (GUI.changed)
{
EditorApplication.isPaused = isPaused;
GUIUtility.ExitGUI();
}
if (GUILayout.Button(Toolbar.s_PlayIcons[num + 2], "CommandRight", new GUILayoutOption[0]))
{
EditorApplication.Step();
GUIUtility.ExitGUI();
}
}