API 10
This commit is contained in:
parent
7027d291ef
commit
93fac6efb0
11
IconCache.cs
11
IconCache.cs
@ -17,14 +17,15 @@ public sealed class IconCache : IDisposable
|
||||
_textureProvider = textureProvider;
|
||||
}
|
||||
|
||||
public ISharedImmediateTexture GetIcon(uint iconId)
|
||||
public IDalamudTextureWrap? GetIcon(uint iconId)
|
||||
{
|
||||
if (!_textureWraps.TryGetValue(iconId, out ISharedImmediateTexture? iconTex))
|
||||
{
|
||||
if (_textureWraps.TryGetValue(iconId, out ISharedImmediateTexture? iconTex))
|
||||
return iconTex;
|
||||
|
||||
iconTex = _textureProvider.GetFromGameIcon(new GameIconLookup(iconId));
|
||||
_textureWraps[iconId] = iconTex;
|
||||
return iconTex;
|
||||
}
|
||||
|
||||
return iconTex.TryGetWrap(out IDalamudTextureWrap? wrap, out _) ? wrap : null;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
Loading…
Reference in New Issue
Block a user