diff options
Diffstat (limited to 'core/input/input.h')
-rw-r--r-- | core/input/input.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/input/input.h b/core/input/input.h index 98bbff6441..1b2df49ac0 100644 --- a/core/input/input.h +++ b/core/input/input.h @@ -117,6 +117,7 @@ private: uint64_t idle_frame; bool pressed; float strength; + float raw_strength; }; Map<StringName, Action> action_state; @@ -146,7 +147,6 @@ private: bool connected = false; bool last_buttons[JOY_BUTTON_MAX] = { false }; float last_axis[JOY_AXIS_MAX] = { 0.0f }; - float filter = 0.01f; int last_hat = HAT_MASK_CENTER; int mapping = -1; int hat_current = 0; @@ -223,7 +223,6 @@ private: JoyAxisList _get_output_axis(String output); void _button_event(int p_device, int p_index, bool p_pressed); void _axis_event(int p_device, int p_axis, float p_value); - float _handle_deadzone(int p_device, int p_axis, float p_value); void _parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_emulated); @@ -266,6 +265,10 @@ public: bool is_action_just_pressed(const StringName &p_action) const; bool is_action_just_released(const StringName &p_action) const; float get_action_strength(const StringName &p_action) const; + float get_action_raw_strength(const StringName &p_action) const; + + float get_axis(const StringName &p_negative_action, const StringName &p_positive_action) const; + Vector2 get_vector(const StringName &p_negative_x, const StringName &p_positive_x, const StringName &p_negative_y, const StringName &p_positive_y, float p_deadzone = -1.0f) const; float get_joy_axis(int p_device, int p_axis) const; String get_joy_name(int p_idx); @@ -327,11 +330,6 @@ public: void add_joy_mapping(String p_mapping, bool p_update_existing = false); void remove_joy_mapping(String p_guid); - String get_joy_button_string(int p_button); - String get_joy_axis_string(int p_axis); - int get_joy_axis_index_from_string(String p_axis); - int get_joy_button_index_from_string(String p_button); - int get_unused_joy_id(); bool is_joy_known(int p_device); |