mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Add ability to test arbitrary rectangle for visibility without need of moving cursor.
This commit is contained in:
@ -9102,6 +9102,12 @@ bool ImGui::IsRectVisible(const ImVec2& size)
|
||||
return window->ClipRect.Overlaps(ImRect(window->DC.CursorPos, window->DC.CursorPos + size));
|
||||
}
|
||||
|
||||
bool ImGui::IsRectVisible(const ImVec2& a, const ImVec2& b)
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindowRead();
|
||||
return window->ClipRect.Overlaps(ImRect(a, b));
|
||||
}
|
||||
|
||||
// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
||||
void ImGui::BeginGroup()
|
||||
{
|
||||
|
Reference in New Issue
Block a user