summaryrefslogtreecommitdiff
path: root/src/client/inputhandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/inputhandler.h')
-rw-r--r--src/client/inputhandler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h
index 9be2a2ed4..fc7998f20 100644
--- a/src/client/inputhandler.h
+++ b/src/client/inputhandler.h
@@ -219,6 +219,11 @@ public:
virtual ~InputHandler() = default;
+ virtual bool isRandom() const
+ {
+ return false;
+ }
+
virtual bool isKeyDown(GameKeyType k) = 0;
virtual bool wasKeyDown(GameKeyType k) = 0;
virtual bool cancelPressed() = 0;
@@ -372,6 +377,11 @@ class RandomInputHandler : public InputHandler
public:
RandomInputHandler() = default;
+ bool isRandom() const
+ {
+ return true;
+ }
+
virtual bool isKeyDown(GameKeyType k) { return keydown[keycache.key[k]]; }
virtual bool wasKeyDown(GameKeyType k) { return false; }
virtual bool cancelPressed() { return false; }