diff options
Diffstat (limited to 'core/os/input.h')
-rw-r--r-- | core/os/input.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/os/input.h b/core/os/input.h index 16bcc0ff9a..665fb4ad99 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -55,12 +55,14 @@ public: static Input *get_singleton(); - virtual bool is_key_pressed(int p_scancode)=0; - virtual bool is_mouse_button_pressed(int p_button)=0; - virtual bool is_joy_button_pressed(int p_device, int p_button)=0; - virtual bool is_action_pressed(const StringName& p_action)=0; - - virtual float get_joy_axis(int p_device,int p_axis)=0; + virtual bool is_key_pressed(int p_scancode) const=0; + virtual bool is_mouse_button_pressed(int p_button) const=0; + virtual bool is_joy_button_pressed(int p_device, int p_button) const=0; + virtual bool is_action_pressed(const StringName& p_action) const=0; + virtual bool is_action_just_pressed(const StringName& p_action) const=0; + virtual bool is_action_just_released(const StringName& p_action) const=0; + + virtual float get_joy_axis(int p_device,int p_axis) const=0; virtual String get_joy_name(int p_idx)=0; virtual Array get_connected_joysticks()=0; virtual void joy_connection_changed(int p_idx, bool p_connected, String p_name, String p_guid)=0; @@ -80,9 +82,9 @@ public: virtual void warp_mouse_pos(const Vector2& p_to)=0; - virtual Vector3 get_accelerometer()=0; - virtual Vector3 get_magnetometer()=0; - virtual Vector3 get_gyroscope()=0; + virtual Vector3 get_accelerometer() const=0; + virtual Vector3 get_magnetometer() const=0; + virtual Vector3 get_gyroscope() const=0; virtual void action_press(const StringName& p_action)=0; virtual void action_release(const StringName& p_action)=0; |