Update text-related ImGui calls (#2337)

* Update text-related ImGui calls

* Use ImU8String for SafeTextColored

* Restore wrapped calls

* Update MenuItem call

* Use ImGui.Text over ImGui.TextUnformatted

* Add ImGui.TextColoredWrapped

* Obsolete SafeText helpers

* Fix obsoleted calls

* SafeTextColored didn't exist before imgui-bindings

* Remove %% replacements
This commit is contained in:
Haselnussbomber 2025-08-05 00:46:43 +02:00 committed by GitHub
parent f0021bc8f9
commit 58fbff7c56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
126 changed files with 1433 additions and 1406 deletions

View file

@ -282,6 +282,22 @@ public static unsafe partial class ImGui
text.Dispose();
}
public static void TextColoredWrapped(uint col, ImU8String text)
{
PushStyleColor(ImGuiCol.Text, col);
TextWrapped(text.Span);
PopStyleColor();
text.Dispose();
}
public static void TextColoredWrapped(scoped in Vector4 col, ImU8String text)
{
PushStyleColor(ImGuiCol.Text, col);
TextWrapped(text.Span);
PopStyleColor();
text.Dispose();
}
public static bool TreeNode(ImU8String label)
{
var window = ImGuiP.GetCurrentWindow();