Merge pull request #44184 from madmiraal/xrcontroller-button_released

Rename XRController signal button_release to button_released
This commit is contained in:
Rémi Verschelde 2020-12-08 12:25:41 +01:00 committed by GitHub
commit 1cf53ca90b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@
Emitted when a button on this controller is pressed.
</description>
</signal>
<signal name="button_release">
<signal name="button_released">
<argument index="0" name="button" type="int">
</argument>
<description>

View File

@ -211,7 +211,7 @@ void XRController3D::_notification(int p_what) {
emit_signal("button_pressed", i);
button_states += mask;
} else if (was_pressed && !is_pressed) {
emit_signal("button_release", i);
emit_signal("button_released", i);
button_states -= mask;
};
@ -257,7 +257,7 @@ void XRController3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_mesh"), &XRController3D::get_mesh);
ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::INT, "button")));
ADD_SIGNAL(MethodInfo("button_release", PropertyInfo(Variant::INT, "button")));
ADD_SIGNAL(MethodInfo("button_released", PropertyInfo(Variant::INT, "button")));
ADD_SIGNAL(MethodInfo("mesh_updated", PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh")));
};