using Newtonsoft.Json;
using RhythmBase.Components;
using RhythmBase.Components.Easing;
namespace RhythmBase.Events
{
///
/// Represents a Tint event which is a type of BaseDecorationAction and implements IEaseEvent.
///
public class Tint : BaseDecorationAction, IEaseEvent
{
///
/// Initializes a new instance of the class.
///
public Tint()
{
BorderColor = new PaletteColor(true);
TintColor = new PaletteColor(true)
{
Color = RDColor.White
};
Type = EventType.Tint;
Tab = Tabs.Decorations;
}
///
/// Gets or sets the ease type for the tint event.
///
public EaseType Ease { get; set; }
///
/// Gets or sets the border type for the tint event.
///
public Borders Border { get; set; }
///
/// Gets or sets the border color for the tint event.
///
[EaseProperty]
public PaletteColor BorderColor { get; set; }
///
/// Gets or sets the opacity for the tint event.
///
[EaseProperty]
public int Opacity { get; set; }
///
/// Gets or sets a value indicating whether this event is a tint.
///
[JsonProperty("tint")]
public bool IsTint { get; set; }
///
/// Gets or sets the tint color for the tint event.
///
[EaseProperty]
public PaletteColor TintColor { get; set; }
///
/// Gets or sets the duration of the tint event.
///
public float Duration { get; set; }
///
/// Gets the type of the event.
///
public override EventType Type { get; }
///
/// Gets the tab where the event is categorized.
///
public override Tabs Tab { get; }
///
/// Returns a string that represents the current object.
///
/// A string that represents the current object.
public override string ToString() => base.ToString() + string.Format(" {0}{1}", Border, (Border == Borders.None) ? "" : (":" + BorderColor.ToString()));
}
}