Somewhat fix large macro names
This commit is contained in:
@@ -620,10 +620,7 @@ internal static class ImGuiUtils
|
||||
var lineSize = font.CalcWordWrapPositionA(1, textBuf, currentWrapWidth) ?? textBuf.Length;
|
||||
var lineBuf = textBuf[..lineSize];
|
||||
ImGui.Text(lineBuf.ToString());
|
||||
var remainingBuf = textBuf[lineSize..];
|
||||
|
||||
while (!remainingBuf.IsEmpty && char.IsWhiteSpace(remainingBuf[0]))
|
||||
remainingBuf = remainingBuf[1..];
|
||||
var remainingBuf = textBuf[lineSize..].TrimStart();
|
||||
|
||||
if (!remainingBuf.IsEmpty)
|
||||
{
|
||||
|
||||
@@ -843,15 +843,14 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
||||
|
||||
if (state.MacroName is { } macroName)
|
||||
{
|
||||
using var _ = ImRaii2.TextWrapPos(panelWidth);
|
||||
if (state.MacroUrl is { } macroUrl)
|
||||
{
|
||||
ImGuiUtils.AlignCentered(ImGui.CalcTextSize(macroName).X, panelWidth);
|
||||
ImGuiUtils.Hyperlink(macroName, macroUrl, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGuiUtils.TextCentered(macroName, panelWidth);
|
||||
}
|
||||
}
|
||||
|
||||
using var table = ImRaii.Table("table", 3, ImGuiTableFlags.BordersInnerV | ImGuiTableFlags.SizingStretchSame);
|
||||
|
||||
Reference in New Issue
Block a user