UnityEditor.ParticleEffectUI.PlayStopGUI C# (CSharp) Method

PlayStopGUI() private method

private PlayStopGUI ( ) : void
return void
        internal void PlayStopGUI()
        {
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }
            ParticleSystem root = ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystem);
            if (Event.current.type == EventType.Layout)
            {
                this.m_TimeHelper.Update();
            }
            if (!EditorApplication.isPlaying)
            {
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                bool flag = ParticleSystemEditorUtils.editorIsPlaying && !ParticleSystemEditorUtils.editorIsPaused;
                if (GUILayout.Button(!flag ? s_Texts.play : s_Texts.pause, "ButtonLeft", new GUILayoutOption[0]))
                {
                    if (flag)
                    {
                        this.Pause();
                    }
                    else
                    {
                        this.Play();
                    }
                }
                if (GUILayout.Button(s_Texts.stop, "ButtonRight", new GUILayoutOption[0]))
                {
                    this.Stop();
                }
                GUILayout.EndHorizontal();
                string kFloatFieldFormatString = EditorGUI.kFloatFieldFormatString;
                EditorGUI.kFloatFieldFormatString = s_Texts.secondsFloatFieldFormatString;
                ParticleSystemEditorUtils.editorSimulationSpeed = Mathf.Clamp(EditorGUILayout.FloatField(s_Texts.previewSpeed, ParticleSystemEditorUtils.editorSimulationSpeed, new GUILayoutOption[0]), 0f, 10f);
                EditorGUI.kFloatFieldFormatString = kFloatFieldFormatString;
                this.PlayBackTimeGUI(root);
            }
            else
            {
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                if (GUILayout.Button(s_Texts.play, new GUILayoutOption[0]))
                {
                    this.Stop();
                    this.Play();
                }
                if (GUILayout.Button(s_Texts.stop, new GUILayoutOption[0]))
                {
                    this.Stop();
                }
                GUILayout.EndHorizontal();
            }
            this.HandleKeyboardShortcuts(root);
        }