|
@@ -61,6 +61,9 @@ void Input::_bind_methods() {
|
|
ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action"), &Input::is_action_just_pressed);
|
|
ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action"), &Input::is_action_just_pressed);
|
|
ClassDB::bind_method(D_METHOD("is_action_just_released", "action"), &Input::is_action_just_released);
|
|
ClassDB::bind_method(D_METHOD("is_action_just_released", "action"), &Input::is_action_just_released);
|
|
ClassDB::bind_method(D_METHOD("get_action_strength", "action"), &Input::get_action_strength);
|
|
ClassDB::bind_method(D_METHOD("get_action_strength", "action"), &Input::get_action_strength);
|
|
|
|
+ ClassDB::bind_method(D_METHOD("get_action_raw_strength", "action"), &Input::get_action_raw_strength);
|
|
|
|
+ ClassDB::bind_method(D_METHOD("get_axis", "negative_action", "positive_action"), &Input::get_axis);
|
|
|
|
+ ClassDB::bind_method(D_METHOD("get_vector", "negative_x", "positive_x", "negative_y", "positive_y", "deadzone"), &Input::get_vector, DEFVAL(-1.0f));
|
|
ClassDB::bind_method(D_METHOD("add_joy_mapping", "mapping", "update_existing"), &Input::add_joy_mapping, DEFVAL(false));
|
|
ClassDB::bind_method(D_METHOD("add_joy_mapping", "mapping", "update_existing"), &Input::add_joy_mapping, DEFVAL(false));
|
|
ClassDB::bind_method(D_METHOD("remove_joy_mapping", "guid"), &Input::remove_joy_mapping);
|
|
ClassDB::bind_method(D_METHOD("remove_joy_mapping", "guid"), &Input::remove_joy_mapping);
|
|
ClassDB::bind_method(D_METHOD("joy_connection_changed", "device", "connected", "name", "guid"), &Input::joy_connection_changed);
|
|
ClassDB::bind_method(D_METHOD("joy_connection_changed", "device", "connected", "name", "guid"), &Input::joy_connection_changed);
|
|
@@ -125,10 +128,13 @@ void Input::_bind_methods() {
|
|
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
|
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
|
#ifdef TOOLS_ENABLED
|
|
#ifdef TOOLS_ENABLED
|
|
|
|
|
|
- const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
|
|
|
|
|
+ const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
|
|
|
|
|
String pf = p_function;
|
|
String pf = p_function;
|
|
- if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" || pf == "is_action_just_pressed" || pf == "is_action_just_released" || pf == "get_action_strength")) {
|
|
|
|
|
|
+ if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
|
|
|
|
+ pf == "is_action_just_pressed" || pf == "is_action_just_released" ||
|
|
|
|
+ pf == "get_action_strength" || pf == "get_action_raw_strength" ||
|
|
|
|
+ pf == "get_axis" || pf == "get_vector")) {
|
|
List<PropertyInfo> pinfo;
|
|
List<PropertyInfo> pinfo;
|
|
ProjectSettings::get_singleton()->get_property_list(&pinfo);
|
|
ProjectSettings::get_singleton()->get_property_list(&pinfo);
|
|
|
|
|