mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Merge branch '2016-08-generalized_visibility_test' of https://github.com/thedmd/imgui into thedmd-2016-08-generalized_visibility_test
This commit is contained in:
commit
a1521534ba
@ -9116,6 +9116,12 @@ bool ImGui::IsRectVisible(const ImVec2& size)
|
|||||||
return window->ClipRect.Overlaps(ImRect(window->DC.CursorPos, window->DC.CursorPos + 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.)
|
// 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()
|
void ImGui::BeginGroup()
|
||||||
{
|
{
|
||||||
|
1
imgui.h
1
imgui.h
@ -410,6 +410,7 @@ namespace ImGui
|
|||||||
IMGUI_API bool IsRootWindowOrAnyChildFocused(); // is current root window or any of its child (including current window) focused
|
IMGUI_API bool IsRootWindowOrAnyChildFocused(); // is current root window or any of its child (including current window) focused
|
||||||
IMGUI_API bool IsRootWindowOrAnyChildHovered(); // is current root window or any of its child (including current window) hovered and hoverable (not blocked by a popup)
|
IMGUI_API bool IsRootWindowOrAnyChildHovered(); // is current root window or any of its child (including current window) hovered and hoverable (not blocked by a popup)
|
||||||
IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle of given size starting from cursor pos is visible (not clipped). to perform coarse clipping on user's side (as an optimization)
|
IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle of given size starting from cursor pos is visible (not clipped). to perform coarse clipping on user's side (as an optimization)
|
||||||
|
IMGUI_API bool IsRectVisible(const ImVec2& a, const ImVec2& b); // "
|
||||||
IMGUI_API bool IsPosHoveringAnyWindow(const ImVec2& pos); // is given position hovering any active imgui window
|
IMGUI_API bool IsPosHoveringAnyWindow(const ImVec2& pos); // is given position hovering any active imgui window
|
||||||
IMGUI_API float GetTime();
|
IMGUI_API float GetTime();
|
||||||
IMGUI_API int GetFrameCount();
|
IMGUI_API int GetFrameCount();
|
||||||
|
Loading…
Reference in New Issue
Block a user