예제 #1
0
        public override bool DragElement(TreeViewItem targetItem, Rect targetItemRect, int row)
        {
            TimelineTrackGUI timelineTrackGUI = targetItem as TimelineTrackGUI;
            bool             flag             = !(DragAndDrop.GetGenericData("TimelineDragging") is TimelineDragging.TimelineDragData) && (DragAndDrop.get_objectReferences().Any <Object>() || DragAndDrop.get_paths().Any <string>());

            return((timelineTrackGUI == null || !flag || targetItemRect.Contains(Event.get_current().get_mousePosition())) && base.DragElement(targetItem, targetItemRect, row));
        }
 public TimelineMarkerGUI(TimelineMarker theMarker, TimelineAsset timeline, TimelineTrackGUI parent) : base(parent)
 {
     this.m_EditorItem = EditorItemFactory.GetEditorMarker(theMarker);
     if (parent.drawer != null)
     {
         parent.drawer.ConfigureUIEvent(this);
     }
 }
예제 #3
0
 private void RecomputeRectUnions(TimelineWindow.TimelineState state)
 {
     this.m_MustRecomputeUnions = false;
     this.m_Unions.Clear();
     if (this.get_children() != null)
     {
         foreach (TreeViewItem current in this.get_children())
         {
             TimelineTrackGUI timelineTrackGUI = current as TimelineTrackGUI;
             if (timelineTrackGUI != null)
             {
                 timelineTrackGUI.RebuildGUICache(state);
                 this.m_Unions.AddRange(TimelineClipUnion.Build(timelineTrackGUI.clips));
             }
         }
     }
 }
예제 #4
0
        public TimelineClipGUI(TimelineClip clip, TimelineTrackGUI parent) : base(parent)
        {
            this.m_EditorItem  = EditorItemFactory.GetEditorClip(clip);
            clip.dirtyHash     = 0;
            this.supportResize = true;
            if (parent.drawer != null)
            {
                parent.drawer.ConfigureUIClip(this);
            }
            DragClipHandle clipHandleManipulator = (!clip.SupportsClipIn()) ? new SimpleDragClipHandle() : new DragClipHandle();

            this.m_LeftHandle     = new TimelineClipHandle(this, TimelineClipHandle.DragDirection.Left, clipHandleManipulator);
            this.m_RightHandle    = new TimelineClipHandle(this, TimelineClipHandle.DragDirection.Right, clipHandleManipulator);
            this.m_BlendInHandle  = new TimelineBlendHandle(this, TimelineBlendHandle.DragDirection.Left);
            this.m_BlendOutHandle = new TimelineBlendHandle(this, TimelineBlendHandle.DragDirection.Right);
            base.AddChild(this.m_LeftHandle);
            base.AddChild(this.m_RightHandle);
            base.AddChild(this.m_BlendInHandle);
            base.AddChild(this.m_BlendOutHandle);
            TimelineItemGUI.s_ItemToItemGUI[clip] = this;
        }
예제 #5
0
 public InlineCurveEditor(TimelineTrackGUI trackGUI)
 {
     this.m_TrackGUI = trackGUI;
 }
예제 #6
0
 protected TimelineItemGUI(TimelineTrackGUI parent)
 {
     this.m_ParentTrack = parent;
     this.m_Styles      = DirectorStyles.Instance;
 }