Interface TranslatableComponent
- All Superinterfaces:
Buildable<TranslatableComponent,,TranslatableComponent.Builder> BuildableComponent<TranslatableComponent,,TranslatableComponent.Builder> Component
public interface TranslatableComponent
extends BuildableComponent<TranslatableComponent,TranslatableComponent.Builder>
A component that displays a translatable text.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for translatable components. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Returns the key of the translation.Returns the parameters of the translation.Creates a new translatable component builder.static TranslatableComponenttranslatable(String key) Creates a new translatable component with the specified key.static TranslatableComponenttranslatable(String key, ComponentColor textColor) Creates a new translatable component with the specified key and text color.static TranslatableComponenttranslatable(String key, TextStyle textStyle) Creates a new translatable component with the specified key and text textStyle.static TranslatableComponenttranslatable(String key, TranslationArguments parameters) Creates a new translatable component with the specified key and parameters.static TranslatableComponenttranslatable(String key, TranslationArguments parameters, ComponentColor textColor) Creates a new translatable component with the specified key, parameters, and text color.static TranslatableComponenttranslatable(String key, TranslationArguments parameters, TextStyle textStyle) Creates a new translatable component with the specified key, parameters, and text textStyle.static TranslatableComponenttranslatable(mindustry.ctype.MappableContent content) Creates a new translatable component with the specified content.static TranslatableComponenttranslatable(mindustry.ctype.MappableContent content, ComponentColor textColor) Creates a new translatable component with the specified content and text color.static TranslatableComponenttranslatable(mindustry.ctype.MappableContent content, TextStyle textStyle) Creates a new translatable component with the specified content and text textStyle.static TranslatableComponenttranslatable(mindustry.game.Team team) Creates a new translatable component with the specified team.static TranslatableComponenttranslatable(mindustry.game.Team team, ComponentColor textColor) Creates a new translatable component with the specified team and text color.static TranslatableComponenttranslatable(mindustry.game.Team team, TextStyle textStyle) Creates a new translatable component with the specified team and text textStyle.Methods inherited from interface com.xpdustry.distributor.api.component.Component
compress, getTextStyle
-
Method Details
-
translatable
Creates a new translatable component builder. -
translatable
Creates a new translatable component with the specified key and parameters.- Parameters:
key- the keyparameters- the parameters- Returns:
- the translatable component
-
translatable
static TranslatableComponent translatable(String key, TranslationArguments parameters, ComponentColor textColor) Creates a new translatable component with the specified key, parameters, and text color.- Parameters:
key- the keyparameters- the parameterstextColor- the text color- Returns:
- the translatable component
-
translatable
static TranslatableComponent translatable(String key, TranslationArguments parameters, TextStyle textStyle) Creates a new translatable component with the specified key, parameters, and text textStyle.- Parameters:
key- the keyparameters- the parameterstextStyle- the text textStyle- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified key.- Parameters:
key- the key- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified key and text color.- Parameters:
key- the keytextColor- the text color- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified key and text textStyle.- Parameters:
key- the keytextStyle- the text textStyle- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified content.- Parameters:
content- the content- Returns:
- the translatable component
-
translatable
static TranslatableComponent translatable(mindustry.ctype.MappableContent content, ComponentColor textColor) Creates a new translatable component with the specified content and text color.- Parameters:
content- the contenttextColor- the text color- Returns:
- the translatable component
-
translatable
static TranslatableComponent translatable(mindustry.ctype.MappableContent content, TextStyle textStyle) Creates a new translatable component with the specified content and text textStyle.- Parameters:
content- the contenttextStyle- the text textStyle- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified team.- Parameters:
team- the team- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified team and text color.- Parameters:
team- the teamtextColor- the text color- Returns:
- the translatable component
-
translatable
Creates a new translatable component with the specified team and text textStyle.- Parameters:
team- the teamtextStyle- the text textStyle- Returns:
- the translatable component
-
getKey
String getKey()Returns the key of the translation. -
getParameters
TranslationArguments getParameters()Returns the parameters of the translation.
-