This is only used in rare/specific situations to manufacture an ID out of nowhere.
| 2992 | |
| 2993 | // This is only used in rare/specific situations to manufacture an ID out of nowhere. |
| 2994 | ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs) |
| 2995 | { |
| 2996 | ImGuiID seed = IDStack.back(); |
| 2997 | const int r_rel[4] = { (int)(r_abs.Min.x - Pos.x), (int)(r_abs.Min.y - Pos.y), (int)(r_abs.Max.x - Pos.x), (int)(r_abs.Max.y - Pos.y) }; |
| 2998 | ImGuiID id = ImHashData(&r_rel, sizeof(r_rel), seed); |
| 2999 | ImGui::KeepAliveID(id); |
| 3000 | return id; |
| 3001 | } |
| 3002 | |
| 3003 | static void SetCurrentWindow(ImGuiWindow* window) |
| 3004 | { |
no test coverage detected