mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-21 01:44:21 +00:00
Added IsAnyMouseDown() helper.
Examples: DirectX9/10/11: Using IsAnyMouseDown() instead of local function.
This commit is contained in:
parent
febde0eb21
commit
7cc1bc7635
5 changed files with 22 additions and 39 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue