diff --git a/Craftimizer/Utils/IconManager.cs b/Craftimizer/Utils/IconManager.cs index a31f50b..9903084 100644 --- a/Craftimizer/Utils/IconManager.cs +++ b/Craftimizer/Utils/IconManager.cs @@ -61,9 +61,9 @@ public sealed class IconManager : IDisposable } // TODO: Unload when unused, but with a custom timer? - private sealed class CachedIcon : ITextureIcon + private sealed class CachedIcon(ISharedImmediateTexture source) : ITextureIcon { - private LoadedIcon Base { get; } + private LoadedIcon Base { get; } = new(source); public ISharedImmediateTexture Source => Base.Source; @@ -71,11 +71,6 @@ public sealed class IconManager : IDisposable public nint ImGuiHandle => Base.ImGuiHandle; - public CachedIcon(ISharedImmediateTexture source) - { - Base = new(source); - } - public void Release() { Base.Dispose();