MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / GetIDWithSeed

Method GetIDWithSeed

ImGUI GLFW Tutorial/imgui/imgui.cpp:7060–7069  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

7058// (note that when using this pattern, TestEngine's "Stack Tool" will tend to not display the intermediate stack level.
7059// for that to work we would need to do PushOverrideID() -> ItemAdd() -> PopID() which would alter widget code a little more)
7060ImGuiID ImGui::GetIDWithSeed(const char* str, const char* str_end, ImGuiID seed)
7061{
7062 ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
7063 ImGui::KeepAliveID(id);
7064#ifdef IMGUI_ENABLE_TEST_ENGINE
7065 ImGuiContext& g = *GImGui;
7066 IMGUI_TEST_ENGINE_ID_INFO2(id, ImGuiDataType_String, str, str_end);
7067#endif
7068 return id;
7069}
7070
7071void ImGui::PopID()
7072{

Callers

nothing calls this directly

Calls 1

ImHashStrFunction · 0.70

Tested by

no test coverage detected