Obsolete SafeText helpers

This commit is contained in:
Haselnussbomber 2025-08-04 21:19:58 +02:00
parent 402d8c60e3
commit c37c86ffdf
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1

View file

@ -5,7 +5,6 @@ using System.Numerics;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.Text.Unicode; using System.Text.Unicode;
using Dalamud.Bindings.ImGui; using Dalamud.Bindings.ImGui;
@ -239,6 +238,7 @@ public static partial class ImGuiHelpers
/// Write unformatted text wrapped. /// Write unformatted text wrapped.
/// </summary> /// </summary>
/// <param name="text">The text to write.</param> /// <param name="text">The text to write.</param>
[Obsolete("Use ImGui.TextWrapped. It's safe now.", true)]
public static void SafeTextWrapped(ImU8String text) => ImGui.TextWrapped(text); public static void SafeTextWrapped(ImU8String text) => ImGui.TextWrapped(text);
/// <summary> /// <summary>
@ -246,6 +246,7 @@ public static partial class ImGuiHelpers
/// </summary> /// </summary>
/// <param name="color">The color of the text.</param> /// <param name="color">The color of the text.</param>
/// <param name="text">The text to write.</param> /// <param name="text">The text to write.</param>
[Obsolete("Use ImGui.TextColored. It's safe now.", true)]
public static void SafeTextColored(Vector4 color, ImU8String text) public static void SafeTextColored(Vector4 color, ImU8String text)
{ {
using (ImRaii.PushColor(ImGuiCol.Text, color)) using (ImRaii.PushColor(ImGuiCol.Text, color))
@ -259,11 +260,12 @@ public static partial class ImGuiHelpers
/// </summary> /// </summary>
/// <param name="color">The color of the text.</param> /// <param name="color">The color of the text.</param>
/// <param name="text">The text to write.</param> /// <param name="text">The text to write.</param>
[Obsolete("Use ImGui.TextColoredWrapped. It's safe.", true)]
public static void SafeTextColoredWrapped(Vector4 color, ImU8String text) public static void SafeTextColoredWrapped(Vector4 color, ImU8String text)
{ {
using (ImRaii.PushColor(ImGuiCol.Text, color)) using (ImRaii.PushColor(ImGuiCol.Text, color))
{ {
SafeTextWrapped(text); ImGui.TextWrapped(text);
} }
} }