summaryrefslogtreecommitdiffstats
path: root/core/os/input.cpp
diff options
context:
space:
mode:
authorhondres <liu.gam3@gmail.com>2016-01-08 00:40:41 +0100
committerhondres <liu.gam3@gmail.com>2016-01-08 00:40:41 +0100
commitc632c13c66db715b816390f0734f2b1839a7ff3e (patch)
tree01d0c5800712b9ac5bcde597edb91d9855519cb7 /core/os/input.cpp
parent79c1392d17156aeb8d6a2abca16db59b1f8312cc (diff)
downloadredot-engine-c632c13c66db715b816390f0734f2b1839a7ff3e.tar.gz
Add some joystick functions to input. Enables manipulation of mappings at runtime
Diffstat (limited to 'core/os/input.cpp')
-rw-r--r--core/os/input.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp
index d8d746c811..6e1e618d9a 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -53,8 +53,12 @@ void Input::_bind_methods() {
ObjectTypeDB::bind_method(_MD("is_mouse_button_pressed","button"),&Input::is_mouse_button_pressed);
ObjectTypeDB::bind_method(_MD("is_joy_button_pressed","device","button"),&Input::is_joy_button_pressed);
ObjectTypeDB::bind_method(_MD("is_action_pressed","action"),&Input::is_action_pressed);
+ ObjectTypeDB::bind_method(_MD("add_joy_mapping","mapping", "update_existing"),&Input::add_joy_mapping, DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("remove_joy_mapping","guid"),&Input::remove_joy_mapping);
+ ObjectTypeDB::bind_method(_MD("is_joy_known","device"),&Input::is_joy_known);
ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis);
ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name);
+ ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid);
ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer);
//ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want
ObjectTypeDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed);