diff --git a/Dalamud/Interface/Utility/Raii/EndObjects.cs b/Dalamud/Interface/Utility/Raii/EndObjects.cs index 082ac217c..3377b51bc 100644 --- a/Dalamud/Interface/Utility/Raii/EndObjects.cs +++ b/Dalamud/Interface/Utility/Raii/EndObjects.cs @@ -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;