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?
| 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? |
| 9185 | ImGuiID 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 | // " |
| 9194 | ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs) |
no test coverage detected