Beispiel #1
0
 public TimelineRect(Func <Rect> totalRectFunc, float duration = 0)
 {
     this._totalRectFunc = totalRectFunc;
     this.resizableRects = new HorizontalResizableRects(totalRectFunc, new[] { 140f });
     //      this.resizableRects.SetCanResizable(false);
     SetDuration(duration);
 }
Beispiel #2
0
        void Awake()
        {
            this._resizableRects =
                new HorizontalResizableRects(() => new Rect(0, 0, this.position.width, this.position.height),
                                             new[] { 300f });
            this._timelineRect = new TimelineRect(() => _resizableRects.rects[1]);
            this._timelineRect.onDrawTracksLeftSideCallback = () =>
                                                              TimelinableEditorWindowUtil.OnDrawTracksLeftSideCallback(_sequence, _timelineRect);
            this._timelineRect.onDrawTracksRightSideCallback = () =>
                                                               TimelinableEditorWindowUtil.OnDrawTracksRightSideCallback(_sequence, _timelineRect);

            this._timelineRect.isMouseDownOfSelectedItem = (mousePosition) =>
                                                           TimelinableEditorWindowUtil.IsMouseDownOfSelectedItem(mousePosition, _sequence);
            this._timelineRect.tryToSelectUnselectedItemCallback = (mousePosition) =>
                                                                   TimelinableEditorWindowUtil.TryToSelectUnselectedItemCallback(mousePosition, _sequence);
            this._timelineRect.updateSelectedItemsCallback = (selectingRect) =>
                                                             TimelinableEditorWindowUtil.UpdateSelectedItemsCallback(selectingRect, _sequence);
            this._timelineRect.onDraggingSelectedCallback = (deltaDuration) =>
                                                            TimelinableEditorWindowUtil.OnDraggingSelectedCallback(deltaDuration, _sequence, _timelineRect.playTime);
            this._timelineRect.isHasSelectedItem = () => TimelinableEditorWindowUtil.IsHasSelectedItem(_sequence);

            this._timelineRect.onMouseRightButtonClickCallback = (positionRect) =>
                                                                 TimelinableEditorWindowUtil.OnMouseRightButtonClickCallback(positionRect, _sequence.tracks);

            this._timelineRect.onDoEditorCommandCallback = (editorCommand) =>
                                                           TimelinableEditorWindowUtil.OnDoEditorCommandCallback(editorCommand, _sequence.tracks);

            this._timelineRect.onPlayTimeChangeCallback = (playTime) =>
                                                          TimelinableEditorWindowUtil.OnPlayTimeChangeCallback(_sequence, playTime);
        }
Beispiel #3
0
 void Awake()
 {
     this._resizableRects =
         new HorizontalResizableRects(() => new Rect(0, 0, this.position.width, this.position.height), null,
                                      new float[] { 0.3f, 0.6f });
 }