Display compute method for the current project

This commit is contained in:
Jake Dube
2017-05-07 21:00:20 +02:00
committed by Laurent Clouet
parent 92a0a4938c
commit cb03b58dbc
7 changed files with 34 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ public class GuiTextOneLine implements Gui {
private String creditsEarned;
private int sigIntCount = 0;
private String computeMethod;
private String status;
private String line;
@@ -51,6 +52,7 @@ public class GuiTextOneLine implements Gui {
remaining = 0;
creditsEarned = null;
status = "";
computeMethod = "";
line = "";
}
@@ -146,6 +148,11 @@ public class GuiTextOneLine implements Gui {
client = cli;
}
@Override
public void setComputeMethod(String computeMethod_) {
computeMethod = computeMethod_;
}
@Override
public Client getClient() {
return client;
@@ -155,7 +162,7 @@ public class GuiTextOneLine implements Gui {
int charToRemove = line.length();
System.out.print("\r");
line = String.format("Frames rendered: %d remaining: %d Credits earned: %s | %s %s", rendered, remaining, creditsEarned != null ? creditsEarned : "unknown", project, status + (exiting ? " (Exiting after this frame)" : ""));
line = String.format("Frames rendered: %d remaining: %d Credits earned: %s | %s using %s %s", rendered, remaining, creditsEarned != null ? creditsEarned : "unknown", project, computeMethod, status + (exiting ? " (Exiting after this frame)" : ""));
System.out.print(line);
for (int i = line.length(); i <= charToRemove; i++) {
System.out.print(" ");