mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Implement SeString renderer (#1977)
Does not have contextual evaluation. Only styling payloads are handled for (relative) simplicity.
This commit is contained in:
parent
1c0ad61335
commit
844b04faad
24 changed files with 14665 additions and 21 deletions
|
|
@ -16,6 +16,10 @@ using Dalamud.Interface.Utility.Raii;
|
|||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
|
||||
using Lumina.Text.ReadOnly;
|
||||
|
||||
using SeStringRenderer = Dalamud.Interface.Internal.ImGuiSeStringRenderer.SeStringRenderer;
|
||||
|
||||
namespace Dalamud.Interface.Utility;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -177,6 +181,14 @@ public static class ImGuiHelpers
|
|||
if (ImGui.IsItemClicked()) ImGui.SetClipboardText($"{textCopy}");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="SeStringRenderer.DrawWrapped(ReadOnlySeStringSpan, float)"/>
|
||||
public static void SeStringWrapped(ReadOnlySpan<byte> sss, float wrapWidth = 0) =>
|
||||
Service<SeStringRenderer>.Get().DrawWrapped(sss, wrapWidth);
|
||||
|
||||
/// <inheritdoc cref="SeStringRenderer.CompileAndDrawWrapped"/>
|
||||
public static void CompileSeStringWrapped(string text, float wrapWidth = 0) =>
|
||||
Service<SeStringRenderer>.Get().CompileAndDrawWrapped(text, wrapWidth);
|
||||
|
||||
/// <summary>
|
||||
/// Write unformatted text wrapped.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue