forked from aly/qstbak
32 lines
947 B
C#
32 lines
947 B
C#
using System.Numerics;
|
|
|
|
namespace Questionable.Model.Changelog;
|
|
|
|
internal static class ChangeCategoryExtensions
|
|
{
|
|
public static string ToDisplayString(this EChangeCategory category)
|
|
{
|
|
return category switch
|
|
{
|
|
EChangeCategory.Added => "Added",
|
|
EChangeCategory.Changed => "Changed",
|
|
EChangeCategory.Fixed => "Fixed",
|
|
EChangeCategory.Removed => "Removed",
|
|
EChangeCategory.QuestUpdates => "Quest Updates",
|
|
_ => category.ToString(),
|
|
};
|
|
}
|
|
|
|
public static Vector4 GetColor(this EChangeCategory category)
|
|
{
|
|
return category switch
|
|
{
|
|
EChangeCategory.Added => new Vector4(0.3f, 0.8f, 0.4f, 1f),
|
|
EChangeCategory.Changed => new Vector4(0.4f, 0.6f, 0.9f, 1f),
|
|
EChangeCategory.Fixed => new Vector4(0.9f, 0.6f, 0.3f, 1f),
|
|
EChangeCategory.Removed => new Vector4(0.9f, 0.3f, 0.3f, 1f),
|
|
EChangeCategory.QuestUpdates => new Vector4(0.8f, 0.8f, 0.4f, 1f),
|
|
_ => new Vector4(0.7f, 0.7f, 0.7f, 1f),
|
|
};
|
|
}
|
|
}
|