using UnityEngine;
namespace EditorAttributes
{
///
/// Attribute to display a collection of values in toggleble buttons
///
public class ValueButtonsAttribute : PropertyAttribute
{
public bool ShowLabel { get; private set; }
public float ButtonsHeight { get; private set; }
public string CollectionName { get; private set; }
public string[] DisplayNames { get; private set; }
///
/// Attribute to display a collection of values in toggleble buttons
///
/// The name of the collection
/// The height of the selection buttons in pixels
/// Show the label of the field
public ValueButtonsAttribute(string collectionName, float buttonsHeight = 18f, bool showLabel = true)
{
CollectionName = collectionName;
ButtonsHeight = buttonsHeight;
ShowLabel = showLabel;
}
///
/// Attribute to display a collection of values in toggleble buttons
///
/// The name of the collection
/// Change the display name for each button
/// The height of the selection buttons in pixels
/// Show the label of the field
public ValueButtonsAttribute(string collectionName, string[] displayNames, float buttonsHeight = 18f, bool showLabel = true)
{
CollectionName = collectionName;
DisplayNames = displayNames;
ButtonsHeight = buttonsHeight;
ShowLabel = showLabel;
}
}
}