Auto translate popup menus of MenuButton and OptionButton

Currently, `auto_translate` property of a `MenuButton` or `OptionButton`
won't affect its popup menu. It's okay if you want to auto translate,
but requires extra setup if you don't.
This commit is contained in:
Haoyu Qiu
2023-03-27 17:24:31 +08:00
parent b57f3c2e67
commit 150f89352b
3 changed files with 9 additions and 2 deletions

View File

@@ -169,6 +169,10 @@ void MenuButton::_notification(int p_what) {
menu_btn_other->get_popup()->set_focused_item(-1);
}
} break;
case NOTIFICATION_TRANSLATION_CHANGED: {
popup->set_auto_translate(is_auto_translating());
} break;
}
}