Ensure all checks of is_action in the editor which are for 'shortcut' use, check the action exactly.
This commit is contained in:
@ -273,7 +273,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
|
||||
ERR_FAIL_COND(p_event.is_null());
|
||||
|
||||
if (!items.is_empty()) {
|
||||
if (p_event->is_action("ui_down") && p_event->is_pressed()) {
|
||||
if (p_event->is_action("ui_down", true) && p_event->is_pressed()) {
|
||||
int search_from = mouse_over + 1;
|
||||
if (search_from >= items.size()) {
|
||||
search_from = 0;
|
||||
@ -305,7 +305,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (p_event->is_action("ui_up") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_up", true) && p_event->is_pressed()) {
|
||||
int search_from = mouse_over - 1;
|
||||
if (search_from < 0) {
|
||||
search_from = items.size() - 1;
|
||||
@ -337,7 +337,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (p_event->is_action("ui_left") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_left", true) && p_event->is_pressed()) {
|
||||
Node *n = get_parent();
|
||||
if (n) {
|
||||
if (Object::cast_to<PopupMenu>(n)) {
|
||||
@ -349,7 +349,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (p_event->is_action("ui_right") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_right", true) && p_event->is_pressed()) {
|
||||
if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator && !items[mouse_over].submenu.is_empty() && submenu_over != mouse_over) {
|
||||
_activate_submenu(mouse_over, true);
|
||||
set_input_as_handled();
|
||||
@ -361,7 +361,7 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (p_event->is_action("ui_accept") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_accept", true) && p_event->is_pressed()) {
|
||||
if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator) {
|
||||
if (!items[mouse_over].submenu.is_empty() && submenu_over != mouse_over) {
|
||||
_activate_submenu(mouse_over, true);
|
||||
|
||||
Reference in New Issue
Block a user