public void Initialize() { if (m_PlayHeadCursor == null) { m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead); m_PlayHeadCursor.onStartDrag += (AnimationWindowManipulator manipulator, Event evt) => { if (evt.mousePosition.y <= (m_Rect.yMin + 20)) { return(OnStartDragPlayHead(evt)); } return(false); }; m_PlayHeadCursor.onDrag += (AnimationWindowManipulator manipulator, Event evt) => { return(OnDragPlayHead(evt)); }; m_PlayHeadCursor.onEndDrag += (AnimationWindowManipulator manipulator, Event evt) => { return(OnEndDragPlayHead(evt)); }; } }
public void Initialize() { if (this.m_PlayHeadCursor == null) { this.m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead); this.m_PlayHeadCursor.onStartDrag = (AnimationWindowManipulator.OnStartDragDelegate)Delegate.Combine(this.m_PlayHeadCursor.onStartDrag, (manipulator, evt) => (evt.mousePosition.y <= (this.m_Rect.yMin + 20f)) && this.OnDragPlayHead(evt)); this.m_PlayHeadCursor.onDrag = (AnimationWindowManipulator.OnDragDelegate)Delegate.Combine(this.m_PlayHeadCursor.onDrag, (manipulator, evt) => this.OnDragPlayHead(evt)); } }
public void Initialize() { if (this.m_PlayHeadCursor == null) { this.m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead); this.m_PlayHeadCursor.onStartDrag = (AnimationWindowManipulator.OnStartDragDelegate) Delegate.Combine(this.m_PlayHeadCursor.onStartDrag, (manipulator, evt) => (evt.mousePosition.y <= (this.m_Rect.yMin + 20f)) && this.OnDragPlayHead(evt)); this.m_PlayHeadCursor.onDrag = (AnimationWindowManipulator.OnDragDelegate) Delegate.Combine(this.m_PlayHeadCursor.onDrag, (manipulator, evt) => this.OnDragPlayHead(evt)); } }
public void HandleEvents() { if (m_PlayHeadCursor == null) { m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead); m_PlayHeadCursor.onStartDrag += (manipulator, evt) => OnDragPlayHead(evt); m_PlayHeadCursor.onDrag += (manipulator, evt) => OnDragPlayHead(evt); } m_PlayHeadCursor.HandleEvents(); }
public void Initialize() { if (this.m_PlayHeadCursor == null) { this.m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead); TimeCursorManipulator expr_23 = this.m_PlayHeadCursor; expr_23.onStartDrag = (AnimationWindowManipulator.OnStartDragDelegate)Delegate.Combine(expr_23.onStartDrag, new AnimationWindowManipulator.OnStartDragDelegate((AnimationWindowManipulator manipulator, Event evt) => evt.mousePosition.y <= this.m_Rect.yMin + 20f && this.OnDragPlayHead(evt))); TimeCursorManipulator expr_4A = this.m_PlayHeadCursor; expr_4A.onDrag = (AnimationWindowManipulator.OnDragDelegate)Delegate.Combine(expr_4A.onDrag, new AnimationWindowManipulator.OnDragDelegate((AnimationWindowManipulator manipulator, Event evt) => this.OnDragPlayHead(evt))); } }
public void HandleEvents() { if (m_PlayHeadCursor == null) { m_PlayHeadCursor = new TimeCursorManipulator(AnimationWindowStyles.playHead) { drawHead = false }; m_PlayHeadCursor.headColor = PlayHeadColor; m_PlayHeadCursor.lineColor = PlayHeadColor; m_PlayHeadCursor.alignment = TimeCursorManipulator.Alignment.Left; m_PlayHeadCursor.onStartDrag += (manipulator, evt) => OnDragPlayHead(evt); m_PlayHeadCursor.onDrag += (manipulator, evt) => OnDragPlayHead(evt); } m_PlayHeadCursor.HandleEvents(); }