Restore old TabItem function with byte* string (#1797)

* Restore old TabItem function with byte* strinf

* typo
This commit is contained in:
goat 2024-04-30 08:42:11 +02:00 committed by GitHub
parent 00311b4dca
commit 867a5de016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,9 +104,12 @@ public static partial class ImRaii
public static IEndObject TabItem(string label)
=> new EndConditionally(ImGui.EndTabItem, ImGui.BeginTabItem(label));
public static unsafe IEndObject TabItem(byte* label, ImGuiTabItemFlags flags)
=> new EndConditionally(ImGuiNative.igEndTabItem, ImGuiNative.igBeginTabItem(label, null, flags) != 0);
public static unsafe IEndObject TabItem(string label, ImGuiTabItemFlags flags)
{
// I am so sorry for this.
// One-off for now, we should make this into a generic solution if we need it more often
const int ImGuiNET_Util_StackAllocationSizeLimit = 2048;
byte* native_label;