From e8e0abc3313f459868f6d766759d00b35a5c1af2 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Wed, 9 Dec 2020 13:25:00 -0300 Subject: Re-add circle back scrolling to 'PopupMenu' --- scene/gui/popup_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 6dbf005f73..bbc3291bde 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -232,7 +232,7 @@ void PopupMenu::_submenu_timeout() { } void PopupMenu::_gui_input(const Ref &p_event) { - if (p_event->is_action("ui_down") && p_event->is_pressed() && mouse_over != items.size() - 1) { + if (p_event->is_action("ui_down") && p_event->is_pressed()) { int search_from = mouse_over + 1; if (search_from >= items.size()) { search_from = 0; @@ -248,7 +248,7 @@ void PopupMenu::_gui_input(const Ref &p_event) { break; } } - } else if (p_event->is_action("ui_up") && p_event->is_pressed() && mouse_over != 0) { + } else if (p_event->is_action("ui_up") && p_event->is_pressed()) { int search_from = mouse_over - 1; if (search_from < 0) { search_from = items.size() - 1; -- cgit v1.2.3