summaryrefslogtreecommitdiffstats
path: root/test/src/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/example.cpp')
-rw-r--r--test/src/example.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/example.cpp b/test/src/example.cpp
index 6d24379..e605a45 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -348,3 +348,10 @@ bool Example::_has_point(const Vector2 &point) const {
return false;
}
+
+void Example::_input(const Ref<InputEvent> &event) {
+ const InputEventKey *key_event = Object::cast_to<const InputEventKey>(*event);
+ if (key_event) {
+ emit_custom_signal(String("_input: ") + key_event->get_key_label(), key_event->get_unicode());
+ }
+}