From a7b202ef188c789da8940f4fea285485063801b6 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 24 Oct 2019 23:51:33 +0200 Subject: Fix analog input in sliders --- scene/gui/slider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/gui') 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 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; -- cgit v1.2.3