Skip to content

Animations

Short, quiet animations that make screens feel alive, and a setting that lets players turn them all off. Your own widgets can use the same tools.

⏱ 4 minGaldur UI 0.1.0Client

What moves

  • Hover fades on buttons and tabs.
  • A checkbox mark that grows and shrinks.
  • Windows and menu screens that rise slightly on open.
  • Tab content sliding in from its side.
  • Smooth list scrolling.

Durations are short, between 90 and 180 ms, with the curves of GaldurEasing.

ConstantDurationUsed for
HOVER_MS90 msHover fade (buttons, tabs)
TOGGLE_MS110 msCheckbox mark
PAGE_MS160 msTab content sliding in
OPEN_MS180 msScreen opening
SCROLL_SMOOTHING_MS45 msTime constant of smooth scrolling

These live in GaldurAnimations.

Players can turn them off

Mods → Galdur UI → Config → Animations, or config/galdurui-client.toml. Changes are then instant everywhere, including in your mod if you use the tools below.

Animate your own widgets

AnimatedValue is a number that moves to a target over a given time, along an easing curve. Set the target whenever you like, every frame for instance: a transition only starts when the target changes, and it starts from the value shown at that moment, so changing course midway never jumps.

MyWidget.java
private final AnimatedValue hover = new AnimatedValue(0, GaldurAnimations.HOVER_MS, GaldurEasing.OUT_QUAD);protected void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) {    hover.setTarget(isHovered() ? 1 : 0);    int color = mix(idle, hovered, hover.get());    ...}

When the player turned animations off, get() returns the target directly. snap(value) jumps without a transition.

If you write an animation without AnimatedValue, check GaldurAnimations.enabled() first.

Easing curves

Every curve maps a linear progress t from 0 to 1, gives 0 at 0 and 1 at 1.

CurveFeel
LINEARConstant speed.
IN_QUADStarts slow, ends fast.
OUT_QUADStarts fast, ends slow; subtler than OUT_CUBIC.
IN_OUT_QUADSlow at both ends.
OUT_CUBICStarts fast, lands softly: the default choice for UI.
IN_OUT_CUBICSlow at both ends, stronger than IN_OUT_QUAD.
OUT_BACKSlightly overshoots the target before settling: a small bounce.
Example.java
double t = Math.min(1, elapsed / (double) durationMs);int y = (int) Math.round(from + (to - from) * GaldurEasing.OUT_CUBIC.applyAsDouble(t));
© 2026 Galdur Studio · galdurstudio.com · Discord · LGPL-3.0-onlyNot an official Minecraft product. Not approved by or associated with Mojang or Microsoft.