protected void DrawMuteButton(Rect rect, WindowState state) { using (new EditorGUI.DisabledScope(TimelineUtility.IsParentMuted(track))) { EditorGUI.BeginChangeCheck(); var isMuted = track.mutedInHierarchy; var tooltip = isMuted ? Styles.trackMuteBtnOnTooltip : Styles.trackMuteBtnOffTooltip; var muted = GUI.Toggle(rect, isMuted, tooltip, TimelineWindow.styles.trackMuteButton); if (EditorGUI.EndChangeCheck()) { MuteTrack.Mute(new[] { track }, muted); } } }
protected float DrawMuteButton(Rect rect, WindowState state) { if (track.mutedInHierarchy) { using (new EditorGUI.DisabledScope(TimelineUtility.IsParentMuted(track))) { if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.mute)) { MuteTrack.Mute(state, new[] { track }, false); } } return(WindowConstants.trackHeaderButtonSize); } return(0.0f); }