1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-24 02:14:22 +00:00

TabBar: added TabBarQueueFocus() by name for non-docking tab bars. (#8029, #6681)

This commit is contained in:
ocornut 2024-09-30 19:36:58 +02:00
parent 03f007d4cd
commit 655fcf8287
2 changed files with 8 additions and 0 deletions

View file

@ -9627,6 +9627,13 @@ void ImGui::TabBarQueueFocus(ImGuiTabBar* tab_bar, ImGuiTabItem* tab)
tab_bar->NextSelectedTabId = tab->ID;
}
void ImGui::TabBarQueueFocus(ImGuiTabBar* tab_bar, const char* tab_name)
{
IM_ASSERT((tab_bar->Flags & ImGuiTabBarFlags_DockNode) == 0); // Only supported for manual/explicit tab bars
ImGuiID tab_id = TabBarCalcTabID(tab_bar, tab_name);
tab_bar->NextSelectedTabId = tab_id;
}
void ImGui::TabBarQueueReorder(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, int offset)
{
IM_ASSERT(offset != 0);