Fix: ui, set a global progress on the download
This commit is contained in:
@@ -24,6 +24,7 @@ import com.formdev.flatlaf.FlatLaf;
|
||||
import com.formdev.flatlaf.FlatLightLaf;
|
||||
import com.sheepit.client.Client;
|
||||
import com.sheepit.client.Configuration;
|
||||
import com.sheepit.client.DownloadProgress;
|
||||
import com.sheepit.client.Gui;
|
||||
import com.sheepit.client.SettingsLoader;
|
||||
import com.sheepit.client.Stats;
|
||||
@@ -132,6 +133,7 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
|
||||
private boolean waitingForAuthentication;
|
||||
private Client client;
|
||||
private DownloadProgress downloadProgress;
|
||||
|
||||
private BufferedImage iconSprites;
|
||||
private BufferedImage[] trayIconSprites;
|
||||
@@ -141,6 +143,7 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
private ThreadClient threadClient;
|
||||
|
||||
public GuiSwing(boolean useSysTray_, String title_) {
|
||||
downloadProgress = new DownloadProgress(this);
|
||||
framesRendered = 0;
|
||||
useSysTray = useSysTray_;
|
||||
title = title_;
|
||||
@@ -272,10 +275,6 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void status(String msg, int progress, long size) {
|
||||
this.status(msg, progress);
|
||||
}
|
||||
|
||||
@Override public void setRenderingProjectName(String name_) {
|
||||
if (activityWorking != null) {
|
||||
this.activityWorking.setRenderingProjectName(name_);
|
||||
@@ -329,6 +328,10 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
return client;
|
||||
}
|
||||
|
||||
@Override public DownloadProgress getDownloadProgress() {
|
||||
return downloadProgress;
|
||||
}
|
||||
|
||||
@Override public void setClient(Client cli) {
|
||||
client = cli;
|
||||
}
|
||||
@@ -496,5 +499,4 @@ public class GuiSwing extends JFrame implements Gui {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user