ButtonSettings
ButtonSettings
- press_threshold : f32
- release_threshold : f32
Description
Manages settings for gamepad buttons.
It is used inside [
GamepadSettings
] to define the threshold for a [GamepadButton
] to be considered pressed or released. A button is considered pressed if thepress_threshold
value is surpassed and released if therelease_threshold
value is undercut.Allowed values:
0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0
Functions
Function | Summary |
---|---|
clone(_self) | No Documentation 🚧 |
eq(_self, other) | No Documentation 🚧 |
is_pressed(_self, value) | Returns `true` if the button is pressed. A button is considered pressed if the `value` passed is g |
is_released(_self, value) | Returns `true` if the button is released. A button is considered released if the `value` passed is |
press_threshold(_self) | Get the button input threshold above which the button is considered pressed. |
release_threshold(_self) | Get the button input threshold below which the button is considered released. |
set_press_threshold(_self, value) | Try to set the button input threshold above which the button is considered pressed. If the value p |
set_release_threshold(_self, value) | Try to set the button input threshold below which the button is considered released. If the value |