Preview easing curves beside curve dropdowns

CurveProperty holds the easing curves in the order Animation.getCurve
takes them, replacing three copies of the list in zoom, freelook and the
animation config; it's saved the same way. Its dropdown opens a
CurveOptions popup: a CurvePreview graph beside the list, with a dot
running along the hovered curve, or the current one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-27 18:19:18 +02:00
co-authored by claude
parent 55b78989ce
commit 85c7057ba1
10 changed files with 191 additions and 11 deletions
@@ -4,9 +4,9 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.saturnclient.config.property.CurveProperty;
import org.saturnclient.config.property.IntProperty;
import org.saturnclient.config.property.Property;
import org.saturnclient.config.property.SelectProperty;
public class AnimationConfig {
public static ConfigManager config;
@@ -47,12 +47,12 @@ public class AnimationConfig {
// Animation properties
public final IntProperty duration;
public final IntProperty stagger;
public final SelectProperty curve;
public final CurveProperty curve;
public AnimationConfig(boolean enabled, int delay, int stagger) {
this.duration = Property.integer(delay).range(0, 2000, 50).unit("ms");
this.stagger = Property.integer(stagger).range(0, 300, 10).unit("ms");
this.curve = Property.select(1, "Ease In Out Cubic", "Ease Out Cubic", "Ease In Out Back");
this.curve = Property.curve(1);
}
/** The menu this animates, like "Mod Menu" */