Merge pull request #64968 from YeldhamDev/pm_up_fix_bp

This commit is contained in:
Rémi Verschelde 2022-08-29 07:56:22 +02:00 committed by GitHub
commit ec23113403
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,6 +223,7 @@ void PopupMenu::_scroll(float p_factor, const Point2 &p_over) {
void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!items.empty()) {
if (p_event->is_action("ui_down") && p_event->is_pressed()) {
int search_from = mouse_over + 1;
if (search_from >= items.size()) {
@ -312,6 +313,7 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) {
accept_event();
}
}
}
Ref<InputEventMouseButton> b = p_event;