From 75428960463254e70d470955c8bdd72e38ce361d Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Sat, 24 Jun 2017 16:28:19 +0300 Subject: Make the InputEvent device property get saved Fixes #9299 --- core/os/input_event.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/os/input_event.cpp') diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index e60f588be3..1c575aa970 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -140,6 +140,8 @@ void InputEvent::_bind_methods() { ClassDB::bind_method(D_METHOD("is_action_type"), &InputEvent::is_action_type); ClassDB::bind_method(D_METHOD("xformed_by:InputEvent", "xform", "local_ofs"), &InputEvent::xformed_by, DEFVAL(Vector2())); + + ADD_PROPERTY(PropertyInfo(Variant::INT, "device"), "set_device", "get_device"); } InputEvent::InputEvent() { -- cgit v1.2.3