diff options
author | reduz <reduzio@gmail.com> | 2014-04-23 23:20:11 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2014-04-23 23:20:11 -0300 |
commit | ee730b6c9dde7e9b20aefd23ece9c9c356a56898 (patch) | |
tree | 23765f33aef85b46c23d23053e38a8b6e91aa560 /core/input_map.cpp | |
parent | 31f88a700656fc89877864e864d27b70e9aff70f (diff) | |
parent | 88abd7200e332c0713e23f05013d5a2ea0037c75 (diff) |
Merge pull request #323 from adolson/inputmap-bindings
added bindings for InputMap (closes #283)
Diffstat (limited to 'core/input_map.cpp')
-rw-r--r-- | core/input_map.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/input_map.cpp b/core/input_map.cpp index 296b39350a..9426b0568e 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -31,6 +31,24 @@ InputMap *InputMap::singleton=NULL; +void InputMap::_bind_methods() { + + ObjectTypeDB::bind_method(_MD("has_action","action"),&InputMap::has_action); + ObjectTypeDB::bind_method(_MD("get_action_id","action"),&InputMap::get_action_id); + ObjectTypeDB::bind_method(_MD("get_action_from_id","id"),&InputMap::get_action_from_id); + ObjectTypeDB::bind_method(_MD("add_action","action"),&InputMap::add_action); + ObjectTypeDB::bind_method(_MD("erase_action","action"),&InputMap::erase_action); + + ObjectTypeDB::bind_method(_MD("action_add_event","action","event"),&InputMap::action_add_event); + ObjectTypeDB::bind_method(_MD("action_has_event","action","event"),&InputMap::action_has_event); + ObjectTypeDB::bind_method(_MD("action_erase_event","action","event"),&InputMap::action_erase_event); + ObjectTypeDB::bind_method(_MD("get_action_list","action"),&InputMap::get_action_list); + ObjectTypeDB::bind_method(_MD("event_is_action","event","action"),&InputMap::event_is_action); + ObjectTypeDB::bind_method(_MD("load_from_globals"),&InputMap::load_from_globals); + +} + + void InputMap::add_action(const StringName& p_action) { ERR_FAIL_COND( input_map.has(p_action) ); |