|
@@ -2715,6 +2715,7 @@ public:
|
|
|
ImGuiID GetID(const char* str, const char* str_end = NULL);
|
|
|
ImGuiID GetID(const void* ptr);
|
|
|
ImGuiID GetID(int n);
|
|
|
+ ImGuiID GetIDFromPos(const ImVec2& p_abs);
|
|
|
ImGuiID GetIDFromRectangle(const ImRect& r_abs);
|
|
|
|
|
|
// We don't use g.FontSize because the window may be != g.CurrentWindow.
|
|
@@ -3124,8 +3125,8 @@ namespace ImGui
|
|
|
inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window) { window->ParentWindowForFocusRoute = parent_window; }
|
|
|
inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); }
|
|
|
inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); }
|
|
|
- inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); }
|
|
|
inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x - off.x, p.y - off.y); }
|
|
|
+ inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); }
|
|
|
|
|
|
// Windows: Display Order and Focus Order
|
|
|
IMGUI_API void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0);
|