Show how much credits earned in text and oneLine mode
This commit is contained in:
committed by
Laurent Clouet
parent
4bbea8a59d
commit
37155966ad
@@ -94,7 +94,8 @@ public class GuiText implements Gui {
|
||||
public void AddFrameRendered() {
|
||||
this.framesRendered += 1;
|
||||
System.out.println("Frames rendered: " + this.framesRendered);
|
||||
|
||||
String creditsEarned = this.client.getServer().getCreditEarnedOnCurrentSession();
|
||||
System.out.println("Credits earned: " + (creditsEarned != null ? creditsEarned : "unknown"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -94,10 +94,12 @@ public class GuiTextOneLine implements Gui {
|
||||
}
|
||||
|
||||
private void updateLine() {
|
||||
String creditsEarned = client.getServer().getCreditEarnedOnCurrentSession();
|
||||
|
||||
int charToRemove = line.length();
|
||||
|
||||
System.out.print("\r");
|
||||
line = String.format("Frames rendered: %d remaining: %d | %s", rendered, remaining, status) + (exiting ? " (Exiting after this frame)" : "");
|
||||
line = String.format("Frames rendered: %d remaining: %d credits earned: %s| %s", rendered, remaining, creditsEarned != null ? creditsEarned : "unknown", status + (exiting ? " (Exiting after this frame)" : ""));
|
||||
System.out.print(line);
|
||||
for (int i = line.length(); i <= charToRemove; i++) {
|
||||
System.out.print(" ");
|
||||
|
||||
Reference in New Issue
Block a user