mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-24 08:30:02 +00:00
Make popups from MenuButton, OptionButton, and submenus obey the layout direction
This commit is contained in:
@@ -136,6 +136,9 @@ int MenuButton::get_item_count() const {
|
||||
|
||||
void MenuButton::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
|
||||
popup->set_layout_direction((Window::LayoutDirection)get_layout_direction());
|
||||
} break;
|
||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||
if (!is_visible_in_tree()) {
|
||||
popup->hide();
|
||||
|
||||
Reference in New Issue
Block a user