1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rename PopupMenu's set/get_current_index() to set/get_focused_item()

This commit is contained in:
Michael Alexsander
2022-09-06 10:51:14 -03:00
parent a49ec435b2
commit 9507e91c07
6 changed files with 14 additions and 14 deletions

View File

@@ -107,7 +107,7 @@ void MenuButton::pressed() {
if (!_was_pressed_by_mouse()) {
for (int i = 0; i < popup->get_item_count(); i++) {
if (!popup->is_item_disabled(i)) {
popup->set_current_index(i);
popup->set_focused_item(i);
break;
}
}
@@ -169,7 +169,7 @@ void MenuButton::_notification(int p_what) {
menu_btn_other->pressed();
// As the popup wasn't triggered by a mouse click, the item focus needs to be removed manually.
menu_btn_other->get_popup()->set_current_index(-1);
menu_btn_other->get_popup()->set_focused_item(-1);
}
} break;
}