mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 16:29:54 +02:00
Merge branch 'refs/heads/master' into docking
# Conflicts: # docs/CHANGELOG.txt # examples/imgui_impl_glfw.cpp # examples/imgui_impl_sdl.cpp # examples/imgui_impl_win32.cpp # imgui.cpp # imgui_internal.h # imgui_widgets.cpp
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.74
|
||||
// dear imgui, v1.75 WIP
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
@ -6981,6 +6981,12 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store into ImGuiTabItemFlags_NoCloseButton, also honor ImGuiTabItemFlags_NoCloseButton passed by user (although not documented)
|
||||
if (flags & ImGuiTabItemFlags_NoCloseButton)
|
||||
p_open = NULL;
|
||||
else if (p_open == NULL)
|
||||
flags |= ImGuiTabItemFlags_NoCloseButton;
|
||||
|
||||
// Calculate tab contents size
|
||||
ImVec2 size = TabItemCalcSize(label, p_open != NULL);
|
||||
|
||||
@ -6998,9 +7004,6 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
tab_bar->LastTabItemIdx = (short)tab_bar->Tabs.index_from_ptr(tab);
|
||||
tab->ContentWidth = size.x;
|
||||
|
||||
if (p_open == NULL)
|
||||
flags |= ImGuiTabItemFlags_NoCloseButton;
|
||||
|
||||
const bool tab_bar_appearing = (tab_bar->PrevFrameVisible + 1 < g.FrameCount);
|
||||
const bool tab_bar_focused = (tab_bar->Flags & ImGuiTabBarFlags_IsFocused) != 0;
|
||||
const bool tab_appearing = (tab->LastFrameVisible + 1 < g.FrameCount);
|
||||
|
Reference in New Issue
Block a user