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
+9 -1
View File
@@ -44,6 +44,14 @@ public final class Popup {
* @param ownerContext the owner's context from its last render
*/
public static void openBelow(Element owner, Element popup, ElementContext ownerContext) {
openBelow(owner, popup, ownerContext, 0);
}
/**
* Like {@link #openBelow(Element, Element, ElementContext)}, with the popup
* moved {@code offsetX} from the owner's left edge.
*/
public static void openBelow(Element owner, Element popup, ElementContext ownerContext, int offsetX) {
int top = Math.max(ownerContext.visibleTop, SCREEN_MARGIN);
int bottom = Math.min(ownerContext.visibleBottom, screenHeight - SCREEN_MARGIN);
@@ -55,7 +63,7 @@ public final class Popup {
boolean moreRoomBelow = bottom - below >= ownerContext.originY - OWNER_GAP - top;
int y = fitsBelow || (!fitsAbove && moreRoomBelow) ? below : above;
open(owner, popup, ownerContext.originX, y);
open(owner, popup, ownerContext.originX + offsetX, y);
}
public static void close() {