protected override bool ContextClick(Event evt, WindowState state)
        {
            if (evt.alt)
            {
                return(false);
            }

            var selectable = PickerUtils.PickedSelectable();

            if (selectable != null && selectable.IsSelected())
            {
                SequencerContextMenu.ShowItemContextMenu(evt.mousePosition);
                return(true);
            }

            var trackGUI = PickerUtils.PickedTrackBaseGUI();

            if (trackGUI != null)
            {
                SelectionManager.SelectOnly(trackGUI.track);
                trackGUI.drawer.trackMenuContext.clipTimeCreation = TrackDrawer.TrackMenuContext.ClipTimeCreation.Mouse;
                trackGUI.drawer.trackMenuContext.mousePosition    = evt.mousePosition;
                trackGUI.DisplayTrackMenu();
                return(true);
            }

            return(false);
        }
        protected override bool DoubleClick(Event evt, WindowState state)
        {
            if (evt.button != 0)
            {
                return(false);
            }

            var trackGUI = PickerUtils.PickedTrackBaseGUI();

            if (trackGUI == null)
            {
                return(false);
            }

            return(EditTrackInAnimationWindow.Do(state, trackGUI.track));
        }
示例#3
0
        protected override bool DoubleClick(Event evt, WindowState state)
        {
            if (evt.button != 0)
            {
                return(false);
            }

            var trackGUI = PickerUtils.PickedTrackBaseGUI();

            if (trackGUI == null)
            {
                return(false);
            }

            // Double-click is only available for AnimationTracks: it conflicts with selection mechanics on other tracks
            if ((trackGUI.track as AnimationTrack) == null)
            {
                return(false);
            }

            return(EditTrackInAnimationWindow.Do(state, trackGUI.track));
        }