diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-08 09:55:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-08 09:55:11 +0100 |
commit | 31f327a4a9c2637a8d2ada01b293ed138c3e6f99 (patch) | |
tree | 9de30df79b199068abd129482c9892646b38de2a /scene/gui | |
parent | a3ac7a94f05082327e91e14f4772b9a94e969ee4 (diff) | |
parent | a7b202ef188c789da8940f4fea285485063801b6 (diff) |
Merge pull request #33052 from KoBeWi/naughty_sliders
Fix analog input in sliders
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/slider.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp index 9f853cf0c8..ba57be1686 100644 --- a/scene/gui/slider.cpp +++ b/scene/gui/slider.cpp @@ -101,26 +101,26 @@ void Slider::_gui_input(Ref<InputEvent> p_event) { if (!mm.is_valid() && !mb.is_valid()) { - if (p_event->is_action("ui_left") && p_event->is_pressed()) { + if (p_event->is_action_pressed("ui_left", true)) { if (orientation != HORIZONTAL) return; set_value(get_value() - (custom_step >= 0 ? custom_step : get_step())); accept_event(); - } else if (p_event->is_action("ui_right") && p_event->is_pressed()) { + } else if (p_event->is_action_pressed("ui_right", true)) { if (orientation != HORIZONTAL) return; set_value(get_value() + (custom_step >= 0 ? custom_step : get_step())); accept_event(); - } else if (p_event->is_action("ui_up") && p_event->is_pressed()) { + } else if (p_event->is_action_pressed("ui_up", true)) { if (orientation != VERTICAL) return; set_value(get_value() + (custom_step >= 0 ? custom_step : get_step())); accept_event(); - } else if (p_event->is_action("ui_down") && p_event->is_pressed()) { + } else if (p_event->is_action_pressed("ui_down", true)) { if (orientation != VERTICAL) return; |