aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_base.cpp')
-rw-r--r--src/ui/ui_base.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/ui_base.cpp b/src/ui/ui_base.cpp
index b52694e7..c91fcd7b 100644
--- a/src/ui/ui_base.cpp
+++ b/src/ui/ui_base.cpp
@@ -15,4 +15,9 @@ namespace cru::ui
const auto result = ::GetKeyState(virtual_code);
return (static_cast<unsigned short>(result) & 1) != 0;
}
+
+ bool IsAnyMouseButtonDown()
+ {
+ return IsKeyDown(VK_LBUTTON) || IsKeyDown(VK_RBUTTON) || IsKeyDown(VK_MBUTTON);
+ }
}