public static void Draw(InViewTimelineBlock block)
 {
     if (GUILayout.Button("Add Action"))
     {
         block.AddAction();
     }
 }
    public static void Draw(InViewTimelineBlock block)
    {
        for (var i = 0; i < block.Actions.Count; i++)
        {
            InViewTimelineEditorTimelineBlockActionHeaderSection.Draw(i, block);
            InViewTimelineEditorTimelineBlockActionSettingsSection.Draw(block.Actions[i]);
            InViewTimelineEditorTimelineBlockActionFooterSection.Draw();
        }

        InViewTimelineEditorTimelineBlockActionsFooterSection.Draw(block);
    }
    public static void Draw(InViewTimelineBlock block)
    {
        block.Type = (InViewTimelineBlockType)EditorGUILayout.EnumPopup("Type", block.Type);

        if (block.Type == InViewTimelineBlockType.AnimatorClip || block.Type == InViewTimelineBlockType.AnimatorTimestamp)
        {
            block.AnimationName = EditorGUILayout.TextField("Animation Name", block.AnimationName);
        }

        if (block.Type == InViewTimelineBlockType.AnimatorTimestamp)
        {
            block.StartTimeInSeconds = EditorGUILayout.FloatField("Start Time (Seconds)", block.StartTimeInSeconds);
            block.EndTimeInSeconds   = EditorGUILayout.FloatField("End Time (Seconds)", block.EndTimeInSeconds);
        }
    }
Beispiel #4
0
    public static void Draw(int index, InViewTimelineBlock block)
    {
        var suffix = "";

        GUILayout.BeginVertical(EditorStyles.helpBox);
        GUILayout.BeginHorizontal();
        GUILayout.Label($"Action #{index + 1}{suffix}", InViewTimelineEditorStyles.GetHeader(), GUILayout.ExpandWidth(true));

        if (index > 0)
        {
            if (GUILayout.Button("Up", GUILayout.Width(30)))
            {
                block.MoveUp(index);

                return;
            }
        }

        if (index < block.Actions.Count - 1)
        {
            if (GUILayout.Button("Down", GUILayout.Width(50)))
            {
                block.MoveDown(index);

                return;
            }
        }

        if (GUILayout.Button("X", GUILayout.Width(25)))
        {
            block.RemoveAction(index);

            return;
        }

        GUILayout.EndHorizontal();
    }
 public static void Draw(InViewTimelineBlock block)
 {
     block.ViewRequiredToContinue    = GUILayout.Toggle(block.ViewRequiredToContinue, "View Required to Continue");
     block.BlocksToSkipIfInViewAtEnd = EditorGUILayout.IntField("Blocks to Skip if in View at End", block.BlocksToSkipIfInViewAtEnd);
 }