me.legrange.console.Spinner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of console-animation Show documentation
Show all versions of console-animation Show documentation
A small console animation library
The newest version!
package me.legrange.console;
final class Spinner extends Animator {
private final SpinnerStyle style;
private int pos;
Spinner( SpinnerStyle style) {
this.style = style;
}
@Override
String draw(N min, N max, N value) {
if (pos >= style.chars().length) {
pos = 0;
}
var res =style.chars()[pos];
pos ++;
return res; }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy