mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Make progressbar optional.
This commit is contained in:
+27
-12
@@ -34,26 +34,41 @@ extern C2D_SpriteSheet sprites;
|
||||
|
||||
// Draws a Rectangle as the progressbar.
|
||||
void Animation::DrawProgressBar(float currentProgress, float totalProgress, int mode) {
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
if (Config::progress) {
|
||||
// Outline of progressbar.
|
||||
Gui::Draw_Rect(30, 120, 340, 30, BLACK);
|
||||
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Animation::DrawProgressBarInstall(u64 currentProgress, u64 totalProgress, int mode) {
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
if (Config::progress) {
|
||||
// Outline of progressbar.
|
||||
Gui::Draw_Rect(30, 120, 340, 30, BLACK);
|
||||
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 121, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Animation::DrawProgressBarExtract(u64 currentProgress, u64 totalProgress, int mode) {
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 141, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 141, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
if (Config::progress) {
|
||||
// Outline of progressbar.
|
||||
Gui::Draw_Rect(30, 140, 340, 30, BLACK);
|
||||
|
||||
if (mode == 1) {
|
||||
Gui::Draw_Rect(31, 141, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, progressBar);
|
||||
} else {
|
||||
Gui::Draw_Rect(31, 141, (int)(((float)currentProgress / (float)totalProgress) * 338.0f), 28, Config::progressbarColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user