mirror of
https://github.com/godotengine/godot
synced 2024-09-05 21:39:38 +00:00
Merge pull request #36873 from BastiaanOlij/arvr_controller_button_is_bool
ARVRController.is_button_pressed requires to return a boolean
This commit is contained in:
commit
8cb6d5daa4
|
@ -57,7 +57,7 @@
|
|||
</description>
|
||||
</method>
|
||||
<method name="is_button_pressed" qualifiers="const">
|
||||
<return type="int">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="button" type="int">
|
||||
</argument>
|
||||
|
|
|
@ -300,7 +300,7 @@ int ARVRController::get_joystick_id() const {
|
|||
return tracker->get_joy_id();
|
||||
};
|
||||
|
||||
int ARVRController::is_button_pressed(int p_button) const {
|
||||
bool ARVRController::is_button_pressed(int p_button) const {
|
||||
int joy_id = get_joystick_id();
|
||||
if (joy_id == -1) {
|
||||
return false;
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
String get_controller_name(void) const;
|
||||
|
||||
int get_joystick_id() const;
|
||||
int is_button_pressed(int p_button) const;
|
||||
bool is_button_pressed(int p_button) const;
|
||||
float get_joystick_axis(int p_axis) const;
|
||||
|
||||
real_t get_rumble() const;
|
||||
|
|
Loading…
Reference in a new issue