Added IsAnyMouseDown() helper.

Examples: DirectX9/10/11: Using IsAnyMouseDown() instead of local function.
This commit is contained in:
omar
2018-02-10 16:47:13 +01:00
parent febde0eb21
commit 7cc1bc7635
5 changed files with 22 additions and 39 deletions

View File

@ -4526,6 +4526,15 @@ bool ImGui::IsMouseDown(int button)
return g.IO.MouseDown[button];
}
bool ImGui::IsAnyMouseDown()
{
ImGuiContext& g = *GImGui;
for (int n = 0; n < IM_ARRAYSIZE(g.IO.MouseDown); n++)
if (g.IO.MouseDown[n])
return true;
return false;
}
bool ImGui::IsMouseClicked(int button, bool repeat)
{
ImGuiContext& g = *GImGui;