Repository navigation
Accessibility and Sounds
Color blindness, high contrast, text scale and UI sounds.
Each root has its own settings: root.accessibility().
root.accessibility()
.colorVision(ColorVision.DEUTERANOPIA) // correction (daltonize)
.colorVision(ColorVision.PROTANOPIA, Accessibility.ColorMode.SIMULATE) // how a person sees it
.textScale(1.25f) // all font sizes × 1.25 (0.5–3)
.reducedMotion(true) // style and theme transitions become instant
.focusAlwaysVisible(true) // a visible focus ring on top of everything
.narration(true); // focus is narrated via Platform.narrateThe color filter applies to the whole frame at the Canvas level (setColorFilter): fills, gradients, borders,
shadows and text; textures and items are not filtered. Your own filter: extraFilter(ColorFilter), for example
ColorFilter.grayscale(). The narration text is UiElement.accessibleLabel(); buttons, checkboxes and labels take
it from their text, set your own with setAccessibleLabel(...).
High-contrast themes: AccessibleThemes.highContrastDark(), highContrastLight() or
AccessibleThemes.highContrast(theme): black/white background, text at least 7:1, accent at least 4.5:1, 2-pixel
borders and a visible focus outline. There are also filterColors(theme, filter) and reducedMotion(theme).
The HOVER_SOUND and CLICK_SOUND style keys (hover-sound, click-sound in CSS) take a UiSound value:
.button { hover-sound: minecraft:block.note_block.hat 0.12 1.6; click-sound: minecraft:ui.button.click 0.25 1; }
.toggle { click-sound: none; }The hover sound plays only when the pointer enters an enabled element, at most once every 70 ms
(root.setHoverSoundInterval(seconds)). Without click-sound, buttons click like in the game.
Ready-made sets: SoundTheme.VANILLA, SOFT, RETRO, NONE; SoundTheme.custom(name, hover, click),
scaled(volume). SoundTheme.RETRO.applyTo(theme, "nav") assigns sounds to buttons, toggles, checkboxes, menu
items and the listed classes.
← Config Screen · English home · Extending →
Начало работы: Установка · Первый экран
Основы: Раскладка · Стили и темы · Цвета и градиенты · Анимации · Данные и сигналы · События и ввод
Виджеты: Каталог виджетов · Всплывающие окна · Формы · Markdown и книги
Игра: Инвентарь и слоты · Окна-контейнеры · Мобы, предметы и 3D · HUD · Карты
Оформление: Эффекты · Размытие, обрезка и GIF
HTML и CSS: HTML и CSS
Возможности: Языки · Экран настроек · Доступность и звуки
Для продвинутых: Расширение · Отладка и советы · Архитектура
Getting started: Installation · Your First Screen
Basics: Layout · Styles and Themes · Colors and Gradients · Animations · Data and Signals · Events and Input
Widgets: Widget Catalog · Popups · Forms · Markdown and Books
Game: Inventory and Slots · Container Screens · Mobs, Items and 3D · HUD Overlay · Maps
Visuals: Effects · Blur, Clipping and GIF
HTML and CSS: HTML and CSS
Features: Languages · Config Screen · Accessibility and Sounds
Advanced: Extending · Debugging and Tips · Architecture