mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 20:03:41 +01:00
chore: some imraii conversion
This commit is contained in:
parent
14ce85627d
commit
1ce98a2350
8 changed files with 115 additions and 109 deletions
|
|
@ -5,6 +5,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Numerics;
|
||||
|
||||
using Dalamud.Game.ClientState.Keys;
|
||||
using Dalamud.Interface.Raii;
|
||||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
|
||||
|
|
@ -161,9 +162,10 @@ public static class ImGuiHelpers
|
|||
/// <param name="text">The text to write.</param>
|
||||
public static void SafeTextColoredWrapped(Vector4 color, string text)
|
||||
{
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, color);
|
||||
ImGui.TextWrapped(text.Replace("%", "%%"));
|
||||
ImGui.PopStyleColor();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, color))
|
||||
{
|
||||
ImGui.TextWrapped(text.Replace("%", "%%"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue