Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
34 lines
860 B
Java
34 lines
860 B
Java
package prc.autodoc;
|
|
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* An absolutely critical part of the Document Creator, not. Prints a spinning line
|
|
* for the user to look at while the program is working.
|
|
*/
|
|
public final class Spinner {
|
|
private final char[] states = new char[]{'|', '/', '-', '\\'};
|
|
private int curState = 0;
|
|
private boolean active = true;
|
|
private Date lastSpinTime = new Date();
|
|
|
|
|
|
/**
|
|
* Spins the spinner.
|
|
*/
|
|
public void spin() {
|
|
long minTimeBetweenSpinsInMS = 300;
|
|
if (active && new Date().getTime() - lastSpinTime.getTime() > minTimeBetweenSpinsInMS) {
|
|
System.out.print(states[curState = ++curState % states.length] + "\u0008");
|
|
lastSpinTime = new Date();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Turns the spinner off.
|
|
*/
|
|
public void disable() {
|
|
active = false;
|
|
}
|
|
} |