MCPcopy Create free account
hub / github.com/cinder/Cinder / GetIDFromPos

Method GetIDFromPos

src/imgui/imgui.cpp:9015–9021  ·  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

9013// This is only used in rare/specific situations to manufacture an ID out of nowhere.
9014// FIXME: Consider instead storing last non-zero ID + count of successive zero-ID, and combine those?
9015ImGuiID ImGuiWindow::GetIDFromPos(const ImVec2& p_abs)
9016{
9017 ImGuiID seed = IDStack.back();
9018 ImVec2 p_rel = ImGui::WindowPosAbsToRel(this, p_abs);
9019 ImGuiID id = ImHashData(&p_rel, sizeof(p_rel), seed);
9020 return id;
9021}
9022
9023// "
9024ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)

Callers 1

IsItemHoveredMethod · 0.80

Calls 3

WindowPosAbsToRelFunction · 0.85
ImHashDataFunction · 0.85
backMethod · 0.80

Tested by

no test coverage detected