Пример #1
0
        private float DrawRecordButton(Rect rect, TimelineWindow.TimelineState state)
        {
            float result;

            if (this.trackAllowsRecording)
            {
                TrackAsset track = (!base.IsSubTrack()) ? base.track : base.ParentTrack();
                using (new EditorGUI.DisabledScope(base.track.locked || !state.ValidateBindingForTrack(track).IsValid()))
                {
                    if (this.IsRecording(state))
                    {
                        state.editorWindow.Repaint();
                        float      num  = Time.get_realtimeSinceStartup() % 1f;
                        GUIContent none = TimelineTrackGUI.s_ArmForRecordContentOn;
                        if (num < 0.22f)
                        {
                            none = GUIContent.none;
                        }
                        if (GUI.Button(rect, none, GUIStyle.get_none()))
                        {
                            state.UnarmForRecord(base.track);
                        }
                    }
                    else if (GUI.Button(rect, TimelineTrackGUI.s_ArmForRecordContentOff, GUIStyle.get_none()))
                    {
                        state.ArmForRecord(base.track);
                    }
                    result = 16f;
                    return(result);
                }
            }
            result = 0f;
            return(result);
        }