Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Update GUI's progress bar to actually progress when downloading mods #71

Open
Nincodedo opened this issue Sep 29, 2017 · 9 comments
Open
Assignees

Comments

@Nincodedo
Copy link
Member

No description provided.

@Raman1121
Copy link

Raman1121 commented Sep 29, 2017

Hey, I would like to work on this issue.
Can you direct me to the file which needs to be modified? @Nincodedo

@Nincodedo
Copy link
Member Author

@Raman1121 In the gui project, the GUI controller has the progressBar and modpackDownloaderManager. The progressBar needs to be updated with how many mods have been downloaded, however there's no way to currently get that information from the manager.

In the core project, the Reference class has a downloadCount and downloadTotal that keep track of your downloads. This isn't accessible from an instance of the ModpackDownloaderManager so it would need to be refactored.

Let me know if you have any other questions.

@Raman1121
Copy link

Raman1121 commented Oct 2, 2017

@Nincodedo I understood the problem to some extent. Here is what I was able to think after some initial scanning.

First, we need to access the variables downloadCount and downloadVariable from the Reference class and then using some basic math, we need to display a progress bar (possibly using the JProgressBar class). This we need to do in the Controller.java class.

Also, can you tell me what is the exact function of the variables downloadCount and downloadTotal?

Please tell me if I am thinking in the right direction or not.

@Nincodedo
Copy link
Member Author

Yes you are correct. The downloadCount is the number of successfully downloaded mods and downloadTotal is the total number of mods that need to be downloaded. You would basically want to divide downloadCount by downloadTotal to get a percentage to show as the progress bar.

@Raman1121
Copy link

Awesome!
Can you assign this issue to me, please?

@Nincodedo
Copy link
Member Author

Apparently I can't since you don't have access to the repo. I'll assign it to myself even though you are working on it just so everyone knows it is being worked on.

@Nincodedo Nincodedo self-assigned this Oct 2, 2017
@Raman1121
Copy link

Raman1121 commented Oct 2, 2017

Is using JProgressBar class to make the progress bar, the correct approach? @Nincodedo

@Nincodedo
Copy link
Member Author

@Nincodedo
Copy link
Member Author

@Raman1121, didn't get around to this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants