diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2016-09-20 22:12:52 +0200 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2016-09-20 23:36:09 +0200 |
commit | e0fcd9331a7ce0e3afd7240a65ecf3e8c59ef9a3 (patch) | |
tree | 1c9b3a6a61794fcc408e4ba91cb900f7d023823e /core/os/input.cpp | |
parent | c21412fa7e098ac31b5d667d4d9f8eee3f12a2cd (diff) | |
download | redot-engine-e0fcd9331a7ce0e3afd7240a65ecf3e8c59ef9a3.tar.gz |
Add function to get readable names for joystick events
Closes #6476
Diffstat (limited to 'core/os/input.cpp')
-rw-r--r-- | core/os/input.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index 401ab7ffe2..88c17740b1 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -64,6 +64,10 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_connected_joysticks"),&Input::get_connected_joysticks); ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength); ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration); + ObjectTypeDB::bind_method(_MD("get_joy_button_string", "button_index"), &Input::get_joy_button_string); + ObjectTypeDB::bind_method(_MD("get_joy_button_index_from_string", "button"), &Input::get_joy_button_index_from_string); + ObjectTypeDB::bind_method(_MD("get_joy_axis_string", "axis_index"), &Input::get_joy_axis_string); + ObjectTypeDB::bind_method(_MD("get_joy_axis_index_from_string", "axis"), &Input::get_joy_axis_index_from_string); ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration, DEFVAL(0)); ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration); ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer); |