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

Method GetIDFromPos

Dependencies/ImGui/src/imgui.cpp:9811–9817  ·  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

9809// This is only used in rare/specific situations to manufacture an ID out of nowhere.
9810// FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those?
9811ImGuiID ImGuiWindow::GetIDFromPos(const ImVec2& p_abs)
9812{
9813 ImGuiID seed = IDStack.back();
9814 ImVec2 p_rel = ImGui::WindowPosAbsToRel(this, p_abs);
9815 ImGuiID id = ImHashData(&p_rel, sizeof(p_rel), seed);
9816 return id;
9817}
9818
9819// "
9820ImGuiID 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