diff options
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 |