Some changes.

This commit is contained in:
StackZ
2020-03-21 05:02:16 +01:00
parent 73c495db4f
commit 37748b8e22
10 changed files with 320 additions and 323 deletions
+2 -2
View File
@@ -76,9 +76,9 @@ endif
TARGET := Universal-Updater
BUILD := build
UNIVCORE := Universal-Core
SOURCES := $(UNIVCORE) source source/download source/lang source/screens source/utils
SOURCES := $(UNIVCORE) source source/download source/gui source/lang source/screens source/utils
DATA := data
INCLUDES := $(UNIVCORE) include include/download include/lang include/screens include/utils
INCLUDES := $(UNIVCORE) include include/download include/gui include/lang include/screens include/utils
GRAPHICS := assets/gfx
#GFXBUILD := $(BUILD)
ROMFS := romfs
+13 -16
View File
@@ -633,31 +633,19 @@ bool checkWifiStatus(void) {
}
void downloadFailed(void) {
Msg::DisplayMsg(Lang::get("DOWNLOAD_FAILED"));
for (int i = 0; i < 60*2; i++) {
gspWaitForVBlank();
}
Msg::DisplayWarnMsg(Lang::get("DOWNLOAD_FAILED"));
}
void notImplemented(void) {
Msg::DisplayMsg(Lang::get("NOT_IMPLEMENTED"));
for (int i = 0; i < 60*2; i++) {
gspWaitForVBlank();
}
Msg::DisplayWarnMsg(Lang::get("NOT_IMPLEMENTED"));
}
void doneMsg(void) {
Msg::DisplayMsg(Lang::get("DONE"));
for (int i = 0; i < 60*2; i++) {
gspWaitForVBlank();
}
Msg::DisplayWarnMsg(Lang::get("DONE"));
}
void notConnectedMsg(void) {
Msg::DisplayMsg(Lang::get("CONNECT_WIFI"));
for (int i = 0; i < 60*2; i++) {
gspWaitForVBlank();
}
Msg::DisplayWarnMsg(Lang::get("CONNECT_WIFI"));
}
std::string getLatestRelease(std::string repo, std::string item)
@@ -880,7 +868,11 @@ void displayProgressBar() {
C2D_TargetClear(Top, BLACK);
C2D_TargetClear(Bottom, BLACK);
GFX::DrawTop();
if (isScriptSelected == true) {
Gui::DrawStringCentered(0, 1, 0.7f, TextColor, progressBarMsg, 400);
} else {
Gui::DrawStringCentered(0, 1, 0.7f, Config::TxtColor, progressBarMsg, 400);
}
// Display 'Currently Extracting: <Filename>'.
if (progressBarType == 1) {
@@ -890,7 +882,12 @@ void displayProgressBar() {
// Only display this by downloading.
if (progressBarType == 0) {
if (isScriptSelected == true) {
Gui::DrawStringCentered(0, 80, 0.6f, TextColor, str, 400);
} else {
Gui::DrawStringCentered(0, 80, 0.6f, Config::TxtColor, str, 400);
}
Gui::Draw_Rect(30, 120, 340, 30, BLACK);
if (isScriptSelected == true) {
Animation::DrawProgressBar(downloadNow, downloadTotal, 1);
+6 -6
View File
@@ -57,9 +57,9 @@ void Msg::DisplayMsg(std::string text) {
C2D_TargetClear(Bottom, BLACK);
GFX::DrawTop();
if (isScriptSelected == false) {
Gui::DrawString(10, 40, 0.45f, Config::TxtColor, text, 380);
Gui::DrawStringCentered(0, (240-Gui::GetStringHeight(0.6f, text))/2, 0.6f, Config::TxtColor, text, 395, 70);
} else if (isScriptSelected == true) {
Gui::DrawString(10, 40, 0.45f, TextColor, text, 380);
Gui::DrawStringCentered(0, (240-Gui::GetStringHeight(0.6f, text))/2, 0.6f, TextColor, text, 395, 70);
}
GFX::DrawBottom();
C3D_FrameEnd(0);
@@ -102,11 +102,11 @@ bool Msg::promptMsg(std::string promptMsg)
C2D_TargetClear(Bottom, BLACK);
GFX::DrawTop();
if (isScriptSelected == false) {
Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, Config::TxtColor, promptMsg.c_str(), 400);
Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400);
Gui::DrawStringCentered(0, (240-Gui::GetStringHeight(0.6f, promptMsg))/2, 0.6f, Config::TxtColor, promptMsg, 395, 70);
Gui::DrawStringCentered(0, 217, 0.72f, Config::TxtColor, Lang::get("CONFIRM_OR_CANCEL"), 400);
} else if (isScriptSelected == true) {
Gui::DrawString((400-Gui::GetStringWidth(0.6f, promptMsg.c_str()))/2, 100, 0.6f, TextColor, promptMsg.c_str(), 400);
Gui::DrawString((400-Gui::GetStringWidth(0.72f, Lang::get("CONFIRM_OR_CANCEL")))/2, 217, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400);
Gui::DrawStringCentered(0, (240-Gui::GetStringHeight(0.6f, promptMsg))/2, 0.6f, TextColor, promptMsg, 395, 70);
Gui::DrawStringCentered(0, 217, 0.72f, TextColor, Lang::get("CONFIRM_OR_CANCEL"), 400);
}
GFX::DrawBottom();
if (isScriptSelected == false) {