Various refactorings to support ItemFilterPreview
This commit is contained in:
39
Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs
Normal file
39
Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Windows.Media;
|
||||
using Filtration.ObjectModel.Enums;
|
||||
|
||||
namespace Filtration.ObjectModel.Extensions
|
||||
{
|
||||
public static class ItemRarityExtensions
|
||||
{
|
||||
public static Color DefaultRarityTextColor(this ItemRarity itemRarity)
|
||||
{
|
||||
switch (itemRarity)
|
||||
{
|
||||
case ItemRarity.Magic:
|
||||
{
|
||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.MagicItem];
|
||||
}
|
||||
case ItemRarity.Normal:
|
||||
{
|
||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
|
||||
}
|
||||
case ItemRarity.Rare:
|
||||
{
|
||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.RareItem];
|
||||
}
|
||||
case ItemRarity.Unique:
|
||||
{
|
||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.UniqueItem];
|
||||
}
|
||||
case ItemRarity.NotSet:
|
||||
{
|
||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.QuestItem];
|
||||
}
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(itemRarity), itemRarity, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user