Repository navigation
Config Screen
A ready settings screen from a simple description.
ConfigSpec spec = ConfigSpec.builder("mymod/client.toml")
.header("MyMod settings")
.category("hud", "Interface").icon("minecraft:compass")
.bool("showMinimap", "Minimap", true).comment("Show in the corner of the screen")
.integer("minimapSize", "Size", 96, 48, 192).step(8)
.number("opacity", "Opacity", 0.85f, 0.2f, 1f).step(0.05f)
.key("zoomKey", "Zoom", Keys.Z)
.category("look", "Look")
.choice("quality", "Quality", Quality.MEDIUM, Quality.values()).labels(q -> ...)
.color("accent", "Accent", 0xFF5B8CFF).alpha(false)
.string("greeting", "Greeting", "Hello!").maxLength(24)
.build();
spec.load(); // Platform.readFile
boolean on = spec.bool("showMinimap").peek(); // values are signals
new ConfigScreen(spec).title("MyMod").autoSave(true);No reflection: every value is described explicitly and stored in a Signal. set coerces the value to a valid one
(range, length, option, no alpha). ConfigScreen builds side navigation by category and rows: Toggle,
SliderField, TextField, Select, ColorField, KeyBindField, each with a reset-to-default button; search looks
through names, keys, comments and categories; Reset all, Save and auto-save. The file is simple TOML: [category]
sections, key = value, comments with the label and range; unknown and broken lines are skipped when reading.
Начало работы: Установка · Первый экран
Основы: Раскладка · Стили и темы · Цвета и градиенты · Анимации · Данные и сигналы · События и ввод
Виджеты: Каталог виджетов · Всплывающие окна · Формы · 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