MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / GetIDFromRectangle

Method GetIDFromRectangle

lib/imgui/imgui.cpp:2715–2722  ·  view source on GitHub ↗

This is only used in rare/specific situations to manufacture an ID out of nowhere.

Source from the content-addressed store, hash-verified

2713
2714// This is only used in rare/specific situations to manufacture an ID out of nowhere.
2715ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
2716{
2717 ImGuiID seed = IDStack.back();
2718 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) };
2719 ImGuiID id = ImHashData(&r_rel, sizeof(r_rel), seed);
2720 ImGui::KeepAliveID(id);
2721 return id;
2722}
2723
2724static void SetCurrentWindow(ImGuiWindow* window)
2725{

Callers 2

BeginDragDropSourceMethod · 0.80
BeginDragDropTargetMethod · 0.80

Calls 2

ImHashDataFunction · 0.85
backMethod · 0.45

Tested by

no test coverage detected