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