MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / GetIDFromPos

Method GetIDFromPos

Dependencies/ImGui/src/imgui.cpp:9185–9191  ·  view source on GitHub ↗

This is only used in rare/specific situations to manufacture an ID out of nowhere. FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those?

Source from the content-addressed store, hash-verified

9183// This is only used in rare/specific situations to manufacture an ID out of nowhere.
9184// FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those?
9185ImGuiID ImGuiWindow::GetIDFromPos(const ImVec2& p_abs)
9186{
9187 ImGuiID seed = IDStack.back();
9188 ImVec2 p_rel = ImGui::WindowPosAbsToRel(this, p_abs);
9189 ImGuiID id = ImHashData(&p_rel, sizeof(p_rel), seed);
9190 return id;
9191}
9192
9193// "
9194ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)

Callers 1

IsItemHoveredMethod · 0.80

Calls 2

WindowPosAbsToRelFunction · 0.85
ImHashDataFunction · 0.85

Tested by

no test coverage detected