Switch to FontAtlas
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Craftimizer.Utils;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.ManagedFontAtlas;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using ImGuiNET;
|
||||
using ImPlotNET;
|
||||
@@ -651,4 +652,16 @@ internal static class ImGuiUtils
|
||||
AlignCentered(buttonWidth);
|
||||
return ImGui.Button(text, buttonSize);
|
||||
}
|
||||
|
||||
public static Vector2 CalcTextSize(this IFontHandle font, string text)
|
||||
{
|
||||
using (font.Push())
|
||||
return ImGui.CalcTextSize(text);
|
||||
}
|
||||
|
||||
public static void Text(this IFontHandle font, string text)
|
||||
{
|
||||
using (font.Push())
|
||||
ImGui.TextUnformatted(text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user