mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
25 lines
761 B
C#
25 lines
761 B
C#
using System;
|
|
|
|
namespace MiraAPI.Colors;
|
|
|
|
/// <summary>
|
|
/// Used to mark a class for <see cref="CustomColor"/> registration.
|
|
/// </summary>
|
|
/// <param name="idPrefix">The group translation ID prefix to attach to color names before registration.</param>
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|
public class RegisterCustomColorsAttribute(string idPrefix) : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Gets the translation ID prefix for all of the colors within the container type.
|
|
/// </summary>
|
|
public string IdPrefix { get; } = idPrefix;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="RegisterCustomColorsAttribute"/> class.
|
|
/// </summary>
|
|
public RegisterCustomColorsAttribute()
|
|
: this(string.Empty)
|
|
{
|
|
}
|
|
}
|