public static void LoadTexture(string key, Toolbox.Core.STGenericTexture texture, int width, int height) { if (!Icons.ContainsKey(key)) { var iconID = IconRender.CreateTextureRender(texture, width, height); Icons.Add(key, iconID); } LoadImage(Icons[key], width, height); }
public static void LoadTexture(string key, Toolbox.Core.STGenericTexture texture) { if (!Icons.ContainsKey(key)) { var iconID = IconRender.CreateTextureRender(texture, ICON_SIZE, ICON_SIZE); if (iconID == -1) { ImGui.Image((IntPtr)Icons["TEXTURE"], new System.Numerics.Vector2(ICON_SIZE, ICON_SIZE)); return; } Icons.Add(key, iconID); } LoadImage(Icons[key], ICON_SIZE, ICON_SIZE); }