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); }
protected override bool MouseUp(Event evt, WindowState state) { if (!m_Captured) { return(false); } state.RemoveCaptured(this); m_Captured = false; return(true); }
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); }
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); }
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); }