mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Internals, CollapsingHeader, TabItem: Standardized using a #CLOSE id prefix for TabItem and ColllapsingHeader (same as window)
This commit is contained in:
14
imgui.cpp
14
imgui.cpp
@ -6742,6 +6742,20 @@ void ImGui::PushOverrideID(ImGuiID id)
|
||||
window->IDStack.push_back(id);
|
||||
}
|
||||
|
||||
// Helper to avoid a common series of PushOverrideID -> GetID() -> PopID() call
|
||||
// (note that when using this pattern, TestEngine's "Stack Tool" will tend to not display the intermediate stack level.
|
||||
// for that to work we would need to do PushOverrideID() -> ItemAdd() -> PopID() which would alter widget code a little more)
|
||||
ImGuiID ImGui::GetIDWithSeed(const char* str, const char* str_end, ImGuiID seed)
|
||||
{
|
||||
ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
|
||||
ImGui::KeepAliveID(id);
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
ImGuiContext& g = *GImGui;
|
||||
IMGUI_TEST_ENGINE_ID_INFO2(id, ImGuiDataType_String, str, str_end);
|
||||
#endif
|
||||
return id;
|
||||
}
|
||||
|
||||
void ImGui::PopID()
|
||||
{
|
||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||
|
Reference in New Issue
Block a user