#if HAVE_USEQUENCER
using System;
using UnityEngine;
using WellFired;
namespace Framework.Actors {
/// Displays a camera targeting event in the uSequencer timeline
[CustomUSEditor(typeof(USSetPresenterStateEvent))]
public class USSetPresenterStateEventEditor : USEventBaseEditor {
/// Renders the event in the uSequencer timeline
/// Area covered by the event
/// The rectangle the event has covered
public override Rect RenderEvent(Rect myArea) {
USSetPresenterStateEvent stateEvent = TargetEvent as USSetPresenterStateEvent;
if(stateEvent == null) {
Debug.LogWarning(
"Trying to render an event as a USSetPresenterStateEvent, but it is a: " +
TargetEvent.GetType().ToString()
);
}
DrawDefaultBox(myArea);
GUILayout.BeginArea(myArea);
if(stateEvent != null) {
GUILayout.Label("Select State", DefaultLabel);
if(string.IsNullOrEmpty(stateEvent.Description)) {
GUILayout.Label(stateEvent.State.ToString(), DefaultLabel);
} else {
GUILayout.Label(stateEvent.Description, DefaultLabel);
}
}
GUILayout.EndArea();
return myArea;
}
}
} // namespace Framework.Actors
#endif // HAVE_USEQUENCER