diff options
author | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
commit | a410e2048db6f5ef6fb50e401a59b4b98b979050 (patch) | |
tree | 500680c63b074e8c3eefd756fd6a1d0f41840c1a /src/ui/input_util.cpp | |
parent | fcaf471275a67d718887430ee63a53890915c4c7 (diff) | |
download | cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.gz cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.bz2 cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.zip |
...
Diffstat (limited to 'src/ui/input_util.cpp')
-rw-r--r-- | src/ui/input_util.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/ui/input_util.cpp b/src/ui/input_util.cpp deleted file mode 100644 index 193cba4a..00000000 --- a/src/ui/input_util.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "input_util.hpp" - -#include <Windows.h> - -namespace cru::ui { -bool IsKeyDown(const int virtual_code) { - const auto result = ::GetKeyState(virtual_code); - return (static_cast<unsigned short>(result) & 0x8000) != 0; -} - -bool IsKeyToggled(const int virtual_code) { - 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); -} -} // namespace cru::ui |