Class UiTexts
java.lang.Object
dev.xichil.mvui.UiTexts
Ready-made texts: the ones the widgets themselves need, and common button labels mods can reuse.
The first group uses vanilla's own translation keys, which exist in every supported version, so they appear in the player's language without the mod shipping anything:
.footer(Button.builder("done").label(UiTexts.DONE).onPress(host::back).build())
The xis_mvui.* keys are translated by the library's own lang files. Each constant's English fallback is in
its declaration.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Text"Add": aStringListEditor's default Add label.static final Text"Already in the list": aStringListEditor's error for a duplicate item.static final Text"Must be at least %s": aNumberField's error below its minimum; the argument is the minimum.static final Text"Must be at most %s": aNumberField's error above its maximum; the argument is the maximum.static final Text"Cancel" (gui.cancel).static final Text"Alpha": aColorPickereditor's slider, with alpha only.static final Text"Blue": aColorPickereditor's slider.static final Text"Green": aColorPickereditor's slider.static final Text"Hex": the label of aColorPickereditor's hex field.static final Text"Red": aColorPickereditor's slider.static final Text"Done" (gui.done): the usual footer button that saves or confirms and goes back.static final TextA mod's menu once its own code failed (Failsafe): the text of the screen it opens as, and its tooltip in the list of mod menus.static final Text"Mod menus...": the Options screen's button when several mods registered a menu; it opensMOD_MENUS_TITLE.static final Text"Mod menus": title of the list of every registered mod's menu.static final Text"No" (gui.no): aConfirmDialog's default no label.static final Text"Not a color: use #RRGGBB": aColorPickereditor's hex field error.static final Text"Not a color: use #AARRGGBB": aColorPickereditor's hex field error, with alpha.static final Text"Not a number": aNumberField's error for text that doesn't parse.static final Text"Not a whole number": anintfield's error for a decimal.static final Text"OFF" (options.off): aToggle's value while off.static final Text"ON" (options.on): aToggle's value while on.static final Text"Menu...": the defaultScreenFactory.buttonLabel().static final Text"Remove": aStringListEditor's default Remove label.static final Text"▶ %s": a collapsibleSection's header while collapsed; the argument is the title.static final Text"▼ %s": a collapsibleSection's header while expanded; the argument is the title.static final Text"Working…": what a screen shows while aUiHost.runAsync(Callable, BiConsumer)task runs.static final Text"Yes" (gui.yes): aConfirmDialog's default yes label. -
Method Summary
-
Field Details
-
DONE
"Done" (gui.done): the usual footer button that saves or confirms and goes back. -
YES
"Yes" (gui.yes): aConfirmDialog's default yes label. -
NO
"No" (gui.no): aConfirmDialog's default no label. -
CANCEL
"Cancel" (gui.cancel). -
ON
-
OFF
-
WORKING
"Working…": what a screen shows while aUiHost.runAsync(Callable, BiConsumer)task runs. -
ADD
"Add": aStringListEditor's default Add label. -
REMOVE
"Remove": aStringListEditor's default Remove label. -
ALREADY_IN_LIST
"Already in the list": aStringListEditor's error for a duplicate item. -
OPEN_MENU
"Menu...": the defaultScreenFactory.buttonLabel(). -
MOD_MENUS
"Mod menus...": the Options screen's button when several mods registered a menu; it opensMOD_MENUS_TITLE. -
MOD_MENUS_TITLE
"Mod menus": title of the list of every registered mod's menu. -
MENU_OFF
-
SECTION_EXPANDED
-
SECTION_COLLAPSED
-
NOT_A_NUMBER
"Not a number": aNumberField's error for text that doesn't parse. -
NOT_A_WHOLE_NUMBER
-
AT_LEAST
"Must be at least %s": aNumberField's error below its minimum; the argument is the minimum. -
AT_MOST
"Must be at most %s": aNumberField's error above its maximum; the argument is the maximum. -
COLOR_RED
"Red": aColorPickereditor's slider. -
COLOR_GREEN
"Green": aColorPickereditor's slider. -
COLOR_BLUE
"Blue": aColorPickereditor's slider. -
COLOR_ALPHA
"Alpha": aColorPickereditor's slider, with alpha only. -
COLOR_HEX
"Hex": the label of aColorPickereditor's hex field. -
NOT_A_COLOR
"Not a color: use #RRGGBB": aColorPickereditor's hex field error. -
NOT_A_COLOR_ALPHA
"Not a color: use #AARRGGBB": aColorPickereditor's hex field error, with alpha.
-