You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
926 B
37 lines
926 B
using System; |
|
|
|
namespace NaughtyAttributes |
|
{ |
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)] |
|
public class ProgressBarAttribute : DrawerAttribute |
|
{ |
|
public string Name { get; private set; } |
|
public float MaxValue { get; set; } |
|
public string MaxValueName { get; private set; } |
|
public EColor Color { get; private set; } |
|
|
|
public ProgressBarAttribute(string name, float maxValue, EColor color = EColor.Blue) |
|
{ |
|
Name = name; |
|
MaxValue = maxValue; |
|
Color = color; |
|
} |
|
|
|
public ProgressBarAttribute(string name, string maxValueName, EColor color = EColor.Blue) |
|
{ |
|
Name = name; |
|
MaxValueName = maxValueName; |
|
Color = color; |
|
} |
|
|
|
public ProgressBarAttribute(float maxValue, EColor color = EColor.Blue) |
|
: this("", maxValue, color) |
|
{ |
|
} |
|
|
|
public ProgressBarAttribute(string maxValueName, EColor color = EColor.Blue) |
|
: this("", maxValueName, color) |
|
{ |
|
} |
|
} |
|
}
|
|
|