aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_base.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-10 21:53:33 +0800
committercrupest <crupest@outlook.com>2018-11-10 21:53:33 +0800
commite5513daa53cb958b0c83d575c440f40aaf40f562 (patch)
treec6782f0cbfe4eca466f13ef571338e6b55342860 /src/ui/ui_base.cpp
parentcfcd03f564e82419345a7a6900fdc17c5b8c2631 (diff)
downloadcru-e5513daa53cb958b0c83d575c440f40aaf40f562.tar.gz
cru-e5513daa53cb958b0c83d575c440f40aaf40f562.tar.bz2
cru-e5513daa53cb958b0c83d575c440f40aaf40f562.zip
...
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);
+ }
}