示例#1
0
 protected override bool KeyDown(Event evt, WindowState state)
 {
     if (evt.keyCode == KeyCode.Escape)
     {
         m_TimeAreaAutoPanner  = null;
         GUIUtility.hotControl = 0;
         state.RemoveCaptured(this);
         return(true);
     }
     return(false);
 }
示例#2
0
        protected override bool MouseUp(Event evt, WindowState state)
        {
            if (!m_Captured)
            {
                return(false);
            }

            state.RemoveCaptured(this);
            m_Captured = false;

            return(true);
        }
示例#3
0
        protected override bool MouseUp(Event evt, WindowState state)
        {
            m_TimeAreaAutoPanner = null;

            Rect rect = CurrentRectangle();

            if (IsValidRect(rect))
            {
                OnFinish(evt, state, rect);
            }

            state.RemoveCaptured(this);

            return(true);
        }
示例#4
0
        protected override bool MouseUp(Event evt, WindowState state)
        {
            if (!m_Dragged)
            {
                var item = PickerUtils.TopmostPickedItem() as ISelectable;

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

                if (!item.IsSelected())
                {
                    return(false);
                }

                // Re-selecting an item part of a multi-selection should only keep this item selected.
                if (SelectionManager.Count() > 1 && ItemSelection.CanClearSelection(evt))
                {
                    SelectionManager.Clear();
                    item.Select();
                    return(true);
                }

                if (m_CycleMarkersPending)
                {
                    m_CycleMarkersPending = false;
                    TimelineMarkerClusterGUI.CycleMarkers();
                    return(true);
                }

                return(false);
            }

            m_TimeAreaAutoPanner = null;

            DropItems();

            m_SnapEngine      = null;
            m_MoveItemHandler = null;

            state.Evaluate();
            state.RemoveCaptured(this);
            m_Dragged = false;
            TimelineCursors.ClearCursor();

            return(true);
        }
示例#5
0
        protected override bool MouseUp(Event evt, WindowState state)
        {
            if (!m_Captured)
            {
                return(false);
            }

            foreach (var track in m_TracksToResize)
            {
                CommitExtension(track);
            }

            state.GetWindow().treeView.CalculateRowRects();
            state.RemoveCaptured(this);
            m_Captured = false;

            return(true);
        }