Update text-related ImGui calls

This commit is contained in:
Haselnussbomber 2025-07-20 17:08:46 +02:00
parent f0021bc8f9
commit 81c3ad9421
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1
119 changed files with 1277 additions and 1246 deletions

View file

@ -242,7 +242,29 @@ public static partial class ImGuiHelpers
public static void SafeTextWrapped(ImU8String text) => ImGui.TextWrapped(text);
/// <summary>
/// Write unformatted text wrapped.
/// Write colored, unformatted text.
/// </summary>
/// <param name="color">The color of the text.</param>
/// <param name="text">The text to write.</param>
public static void SafeTextColored(Vector4 color, string text)
{
using (ImRaii.PushColor(ImGuiCol.Text, color))
{
ImGui.TextUnformatted(text);
}
}
/// <inheritdoc cref="SafeTextColored(Vector4, string)"/>
public static void SafeTextColored(Vector4 color, ReadOnlySpan<byte> text)
{
using (ImRaii.PushColor(ImGuiCol.Text, color))
{
ImGui.TextUnformatted(text);
}
}
/// <summary>
/// Write colored, unformatted text wrapped.
/// </summary>
/// <param name="color">The color of the text.</param>
/// <param name="text">The text to write.</param>