SboxSuperuser/Engine/Vendor/ImGui/ImGuiContext.TabBar.cs

A small portion of an ImGui context implementation. It stores a dictionary of tab bars, a stack list of tab bars, and exposes CurrentTabBar which returns the top of the stack or null.

// Vendored from zeljkovranjes/sbox-imgui; see LICENSE and PROVENANCE.md in this folder.
using Sandbox;
#pragma warning disable CS0649 // Upstream reserves fields for optional widgets and features.
namespace SboxSuperuser.Engine.Vendor.ImGui;

internal partial class ImGuiContext
{
	public readonly Dictionary<int, ImGuiTabBar> TabBars = new();
	public readonly List<ImGuiTabBar> TabBarStack = new();
	public ImGuiTabBar CurrentTabBar => TabBarStack.Count > 0 ? TabBarStack[^1] : null;
}