This repository has been archived on 2024-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
snakeinabox/Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/InfoBoxAttribute.cs
2020-07-09 11:41:01 -07:00

31 lines
809 B
C#

using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class InfoBoxAttribute : MetaAttribute
{
public string Text { get; private set; }
public InfoBoxType Type { get; private set; }
public string VisibleIf { get; private set; }
public InfoBoxAttribute(string text, InfoBoxType type = InfoBoxType.Normal, string visibleIf = null)
{
this.Text = text;
this.Type = type;
this.VisibleIf = visibleIf;
}
public InfoBoxAttribute(string text, string visibleIf)
: this(text, InfoBoxType.Normal, visibleIf)
{
}
}
public enum InfoBoxType
{
Normal,
Warning,
Error
}
}