Group animation settings per menu

The Animations section shows each menu's duration, stagger and curve
under the menu's name instead of one flat list of 18 rows.
AnimationConfig keeps its name and lists every menu's config; it's saved
under the same keys as before, so existing settings keep loading.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-27 18:12:30 +02:00
co-authored by claude
parent 8b58fe919d
commit 55b78989ce
2 changed files with 39 additions and 1 deletions
@@ -92,7 +92,7 @@ public class ClientSettings extends PanelScreen {
switch (section) {
case GENERAL -> PropertyList.draw(scroll, getGeneralProperties(), Set.of(), listWidth, 0);
case UI_STYLE -> drawUiStyle(scroll, listWidth);
case ANIMATIONS -> PropertyList.draw(scroll, AnimationConfig.config.getProperties(), Set.of(), listWidth, 0);
case ANIMATIONS -> drawAnimations(scroll, listWidth);
}
draw(scroll.dimensions(scrollWidth(width), contentHeight - LIST_Y).position(x, contentY + LIST_Y));
@@ -118,6 +118,18 @@ public class ClientSettings extends PanelScreen {
PropertyList.draw(scroll, properties, getNames(properties, p -> p instanceof ColorProperty), width, y);
}
/**
* Each menu's animation settings under the menu's name.
*/
private static void drawAnimations(Scroll scroll, int width) {
int y = 0;
for (AnimationConfig animation : AnimationConfig.ALL) {
y = PropertyList.drawSection(scroll, animation.name, y) + 4;
y = PropertyList.draw(scroll, animation.getProperties(), Set.of(), width, y) + SECTION_GAP;
}
}
/**
* The top-level settings. The namespaces have sections of their own.
*/