Skip to content

refactor: use traits to dry up code, simplify adding custom components #5

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

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

TurtIeSocks
Copy link
Owner

Traits

I18nComponent

Implementing this trait for your component makes it eligible to register it and enable automatic re-translations.

I18nComponentRegistration

This trait enables the register_i18n_component method on your Bevy App. Registering your components with this method will allow the plugin to automatically update the components when the locale is changed, requires your component to implement the I18nComponent trait. Unfortunately, this does not fully work with the Dynamic Font feature yet.

  app.register_i18n_component::<I18nText>();

@TurtIeSocks TurtIeSocks merged commit 6f8a054 into main Dec 18, 2024
3 checks passed
@TurtIeSocks TurtIeSocks deleted the traits branch December 18, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant