Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto translate popup menus of MenuButton and OptionButton #75384

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

timothyqiu
Copy link
Member

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. I don't think there's a practical use case for translating popup menus while not translating the buttons.

This PR changes internal PopupMenu's auto_translate property when the button's auto_translate changes.

Note: The descriptions in Control.xml were later summarized based on existing behavior, rather than the design at the time of initial implementation.

@timothyqiu timothyqiu added this to the 4.1 milestone Mar 27, 2023
@timothyqiu timothyqiu requested review from a team as code owners March 27, 2023 09:44
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does mean, that you have to be careful if you want different behavior for the main node and its popup, as the main node will override properties that you put on the popup. But I guess it's safe to assume that this is an unlikely case.

scene/gui/option_button.cpp Outdated Show resolved Hide resolved
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.
@YuriSizov YuriSizov merged commit 61e4f91 into godotengine:master Mar 27, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@timothyqiu timothyqiu deleted the cultural-heritage branch March 27, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants