mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
class TimelineClipHandle : ILayerable
|
||||
{
|
||||
Rect m_Rect;
|
||||
readonly TimelineClipGUI m_ClipGUI;
|
||||
readonly TrimEdge m_TrimDirection;
|
||||
readonly LayerZOrder m_ZOrder;
|
||||
|
||||
public Rect boundingRect
|
||||
{
|
||||
get { return m_ClipGUI.parent.ToWindowSpace(m_Rect); }
|
||||
}
|
||||
|
||||
public TrimEdge trimDirection
|
||||
{
|
||||
get { return m_TrimDirection; }
|
||||
}
|
||||
|
||||
public TimelineClipGUI clipGUI
|
||||
{
|
||||
get { return m_ClipGUI; }
|
||||
}
|
||||
|
||||
public LayerZOrder zOrder
|
||||
{
|
||||
get { return m_ZOrder; }
|
||||
}
|
||||
|
||||
public TimelineClipHandle(TimelineClipGUI theClipGUI, TrimEdge trimDirection)
|
||||
{
|
||||
m_TrimDirection = trimDirection;
|
||||
m_ClipGUI = theClipGUI;
|
||||
m_ZOrder = theClipGUI.zOrder.ChangeLayer(Layer.ClipHandles);
|
||||
}
|
||||
|
||||
public void Draw(Rect clientRect, float width, WindowState state)
|
||||
{
|
||||
var handleRect = clientRect;
|
||||
handleRect.width = width;
|
||||
|
||||
if (m_TrimDirection == TrimEdge.End)
|
||||
handleRect.x = clientRect.xMax - width;
|
||||
|
||||
m_Rect = handleRect;
|
||||
if (!TimelineWindow.instance.state.editSequence.isReadOnly)
|
||||
EditorGUIUtility.AddCursorRect(handleRect, MouseCursor.SplitResizeLeftRight);
|
||||
state.spacePartitioner.AddBounds(this, boundingRect);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue