Cache DalamudAssetAttribute lookups (#2014)

This commit is contained in:
nebel 2024-08-17 18:05:15 +09:00 committed by GitHub
parent ecf8e323c4
commit 7a45fb05e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 8 deletions

View file

@ -364,7 +364,7 @@ internal class ImGuiWidget : IDataWindowWidget
public static readonly string[] AssetSources =
Enum.GetValues<DalamudAsset>()
.Where(x => x.GetAttribute<DalamudAssetAttribute>()?.Purpose is DalamudAssetPurpose.TextureFromPng)
.Where(x => x.GetPurpose() is DalamudAssetPurpose.TextureFromPng)
.Select(Enum.GetName)
.ToArray();