aboutsummaryrefslogtreecommitdiff
path: root/src/glfw/key_watcher.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-26 23:15:02 +0200
committerAdrian Kummerlaender2018-05-26 23:15:02 +0200
commit6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184 (patch)
tree5292545e66c32735f2d157ac4406d211094c12e0 /src/glfw/key_watcher.h
parent6ce077f58779376481ab498ca4e1df60c1e2eee3 (diff)
downloadcomputicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar.gz
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar.bz2
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar.lz
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar.xz
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.tar.zst
computicle-6de3d16fd3e7d98c98cdf73c6a3317e1a6b10184.zip
Add KeyWatcher to handle pausing via space
Diffstat (limited to 'src/glfw/key_watcher.h')
-rw-r--r--src/glfw/key_watcher.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glfw/key_watcher.h b/src/glfw/key_watcher.h
new file mode 100644
index 0000000..538829f
--- /dev/null
+++ b/src/glfw/key_watcher.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <GLFW/glfw3.h>
+
+class KeyWatcher {
+private:
+ GLFWwindow* const _handle;
+
+ int _key;
+ int _last_state;
+
+public:
+ KeyWatcher(GLFWwindow* handle, int key);
+
+ bool wasClicked();
+
+};