summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-12-10 11:16:38 +0100
committerGitHub <noreply@github.com>2020-12-10 11:16:38 +0100
commit2a325f388825a20b8e87280d967de80411b2e927 (patch)
treef3fac1b4214c660dd96baa1d59f88769e1d79948 /scene/gui
parentd4d05783d6809662c7372e6c0c94362d73215155 (diff)
parente8e0abc3313f459868f6d766759d00b35a5c1af2 (diff)
Merge pull request #44233 from YeldhamDev/popupmenu_circle_back
Re-add circle back scrolling to 'PopupMenu'
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/popup_menu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 5b076649b0..bfbb3cb3f3 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<InputEvent> &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<InputEvent> &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;