Skip to content

Commit

Permalink
Merge pull request #44184 from madmiraal/xrcontroller-button_released
Browse files Browse the repository at this point in the history
Rename XRController signal button_release to button_released
  • Loading branch information
akien-mga authored Dec 8, 2020
2 parents d94bf9f + 58c38d9 commit 1cf53ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/classes/XRController3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions scene/3d/xr_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down Expand Up @@ -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")));
};

Expand Down

0 comments on commit 1cf53ca

Please sign in to comment.