aboutsummaryrefslogtreecommitdiff
path: root/src/core/frontend/input.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-08-29 11:29:10 -0400
committerGitHub <noreply@github.com>2017-08-29 11:29:10 -0400
commit75cd28a7cc1c73e1be1fc72d4b86b267cbb79081 (patch)
tree18f3e7e5b864511da54d847e645dd23a69033924 /src/core/frontend/input.h
parentacbd46366c893537c3e63f510b8ba04adafc0c02 (diff)
parent2617de1fe6f6f1fc846a8e038e1ea77a894554b2 (diff)
Merge pull request #2899 from wwylele/touch-refactor
Refactor touch input into a TouchDevice
Diffstat (limited to 'src/core/frontend/input.h')
-rw-r--r--src/core/frontend/input.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h
index 5916a901de..8c256beb59 100644
--- a/src/core/frontend/input.h
+++ b/src/core/frontend/input.h
@@ -126,4 +126,10 @@ using AnalogDevice = InputDevice<std::tuple<float, float>>;
*/
using MotionDevice = InputDevice<std::tuple<Math::Vec3<float>, Math::Vec3<float>>>;
+/**
+ * A touch device is an input device that returns a tuple of two floats and a bool. The floats are
+ * x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is pressed.
+ */
+using TouchDevice = InputDevice<std::tuple<float, float, bool>>;
+
} // namespace Input