Updated Release Archive
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.
This commit is contained in:
34
nwn/nwnprc/DocGen/trunk/prc/autodoc/Spinner.java
Normal file
34
nwn/nwnprc/DocGen/trunk/prc/autodoc/Spinner.java
Normal file
@@ -0,0 +1,34 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user