mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-20 10:19:15 +01:00
Messed with behavior of progress bars/ prompts some more.
This commit is contained in:
parent
1768998644
commit
b5c3dbaa44
File diff suppressed because one or more lines are too long
@ -1520,7 +1520,7 @@ ShowProgress (s32 done, s32 total)
|
|||||||
progressTotal = total;
|
progressTotal = total;
|
||||||
progressDone = done;
|
progressDone = done;
|
||||||
|
|
||||||
sprintf(prozent, "%0.2f%%", percent);
|
sprintf(prozent, "%0.2f", percent);
|
||||||
prTxt.SetText(prozent);
|
prTxt.SetText(prozent);
|
||||||
//prTxt.SetFont(fontClock);
|
//prTxt.SetFont(fontClock);
|
||||||
sprintf(timet,"Time left: %d:%02d:%02d",h,m,s);
|
sprintf(timet,"Time left: %d:%02d:%02d",h,m,s);
|
||||||
@ -1561,42 +1561,45 @@ ProgressWindow(const char *title, const char *msg)
|
|||||||
GuiImageData dialogBox(dialogue_box_png);
|
GuiImageData dialogBox(dialogue_box_png);
|
||||||
GuiImage dialogBoxImg(&dialogBox);
|
GuiImage dialogBoxImg(&dialogBox);
|
||||||
if (Settings.wsprompt == yes){
|
if (Settings.wsprompt == yes){
|
||||||
dialogBoxImg.SetWidescreen(CFG.widescreen);}///////////
|
dialogBoxImg.SetWidescreen(CFG.widescreen);}
|
||||||
|
|
||||||
GuiImageData progressbarOutline(progressbar_outline_png);
|
GuiImageData progressbarOutline(progressbar_outline_png);
|
||||||
GuiImage progressbarOutlineImg(&progressbarOutline);
|
GuiImage progressbarOutlineImg(&progressbarOutline);
|
||||||
if (Settings.wsprompt == yes){
|
if (Settings.wsprompt == yes){
|
||||||
progressbarOutlineImg.SetWidescreen(CFG.widescreen);}///////////
|
progressbarOutlineImg.SetWidescreen(CFG.widescreen);}
|
||||||
progressbarOutlineImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
progressbarOutlineImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
progressbarOutlineImg.SetPosition(25, 40);
|
progressbarOutlineImg.SetPosition(25, 40);
|
||||||
|
|
||||||
GuiImageData progressbarEmpty(progressbar_empty_png);
|
GuiImageData progressbarEmpty(progressbar_empty_png);
|
||||||
GuiImage progressbarEmptyImg(&progressbarEmpty);
|
GuiImage progressbarEmptyImg(&progressbarEmpty);
|
||||||
//if (Settings.wsprompt == yes){
|
|
||||||
//progressbarEmptyImg.SetWidescreen(CFG.widescreen);}///////////
|
|
||||||
progressbarEmptyImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
progressbarEmptyImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
progressbarEmptyImg.SetPosition(25, 40);
|
progressbarEmptyImg.SetPosition(25, 40);
|
||||||
progressbarEmptyImg.SetTile(100);
|
progressbarEmptyImg.SetTile(100);
|
||||||
|
|
||||||
GuiImageData progressbar(progressbar_png);
|
GuiImageData progressbar(progressbar_png);
|
||||||
//if (Settings.wsprompt == yes){
|
|
||||||
//progressbarImg.SetWidescreen(CFG.widescreen);}///////////
|
|
||||||
|
|
||||||
progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
progressbarImg.SetPosition(25, 40);
|
progressbarImg.SetPosition(25, 40);
|
||||||
|
|
||||||
GuiText titleTxt(title, 26, (GXColor){70, 70, 10, 255});
|
GuiText titleTxt(title, 26, (GXColor){0, 0, 0, 255});
|
||||||
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
titleTxt.SetPosition(0,60);
|
titleTxt.SetPosition(0,60);
|
||||||
GuiText msgTxt(msg, 26, (GXColor){0, 0, 0, 255});
|
GuiText msgTxt(msg, 26, (GXColor){0, 0, 0, 255});
|
||||||
msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
msgTxt.SetPosition(0,120);
|
msgTxt.SetPosition(0,120);
|
||||||
|
|
||||||
timeTxt.SetAlignment(ALIGN_RIGHT, ALIGN_BOTTOM);
|
GuiText prsTxt("%", 26, (GXColor){0, 0, 0, 255});
|
||||||
timeTxt.SetPosition(-25,-50);
|
prsTxt.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
||||||
|
prsTxt.SetPosition(-188,40);
|
||||||
|
|
||||||
|
timeTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||||
|
timeTxt.SetPosition(275,-50);
|
||||||
|
|
||||||
sizeTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
sizeTxt.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||||
sizeTxt.SetPosition(30, -50);
|
sizeTxt.SetPosition(50, -50);
|
||||||
|
|
||||||
|
prTxt.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
|
prTxt.SetPosition(200, 40);
|
||||||
|
|
||||||
if ((Settings.wsprompt == yes) && (CFG.widescreen)){/////////////adjust for widescreen
|
if ((Settings.wsprompt == yes) && (CFG.widescreen)){/////////////adjust for widescreen
|
||||||
progressbarOutlineImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
progressbarOutlineImg.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
@ -1606,14 +1609,12 @@ ProgressWindow(const char *title, const char *msg)
|
|||||||
progressbarImg.SetPosition(80, 40);
|
progressbarImg.SetPosition(80, 40);
|
||||||
msgTxt.SetMaxWidth(380);
|
msgTxt.SetMaxWidth(380);
|
||||||
|
|
||||||
timeTxt.SetPosition(-65,-50);
|
timeTxt.SetPosition(250,-50);
|
||||||
sizeTxt.SetPosition(70, -50);
|
timeTxt.SetFontSize(22);
|
||||||
|
sizeTxt.SetPosition(90, -50);
|
||||||
|
sizeTxt.SetFontSize(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
prTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
|
||||||
prTxt.SetPosition(0, 40);
|
|
||||||
|
|
||||||
|
|
||||||
promptWindow.Append(&dialogBoxImg);
|
promptWindow.Append(&dialogBoxImg);
|
||||||
promptWindow.Append(&titleTxt);
|
promptWindow.Append(&titleTxt);
|
||||||
promptWindow.Append(&msgTxt);
|
promptWindow.Append(&msgTxt);
|
||||||
@ -1621,6 +1622,7 @@ ProgressWindow(const char *title, const char *msg)
|
|||||||
promptWindow.Append(&progressbarImg);
|
promptWindow.Append(&progressbarImg);
|
||||||
promptWindow.Append(&progressbarOutlineImg);
|
promptWindow.Append(&progressbarOutlineImg);
|
||||||
promptWindow.Append(&prTxt);
|
promptWindow.Append(&prTxt);
|
||||||
|
promptWindow.Append(&prsTxt);
|
||||||
promptWindow.Append(&timeTxt);
|
promptWindow.Append(&timeTxt);
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -1691,7 +1693,7 @@ ProgressDownloadWindow(int choice2)
|
|||||||
progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
progressbarImg.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
progressbarImg.SetPosition(25, 40);
|
progressbarImg.SetPosition(25, 40);
|
||||||
|
|
||||||
GuiText titleTxt("Downloading file:", 26, (GXColor){70, 70, 10, 255});
|
GuiText titleTxt("Downloading file:", 26, (GXColor){0, 0, 0, 255});
|
||||||
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
titleTxt.SetPosition(0,60);
|
titleTxt.SetPosition(0,60);
|
||||||
char msg[25] = " ";
|
char msg[25] = " ";
|
||||||
@ -3462,7 +3464,7 @@ static int MenuSettings()
|
|||||||
GuiImage page1dImg(&page1d);
|
GuiImage page1dImg(&page1d);
|
||||||
GuiButton page1Btn(page1.GetWidth(), page1.GetHeight());
|
GuiButton page1Btn(page1.GetWidth(), page1.GetHeight());
|
||||||
page1Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
page1Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
page1Btn.SetPosition(-201, 90);
|
page1Btn.SetPosition(202, 90);
|
||||||
page1Btn.SetImage(&page1Img);
|
page1Btn.SetImage(&page1Img);
|
||||||
page1Btn.SetSoundOver(&btnSoundOver);
|
page1Btn.SetSoundOver(&btnSoundOver);
|
||||||
page1Btn.SetSoundClick(&btnClick);
|
page1Btn.SetSoundClick(&btnClick);
|
||||||
@ -3480,7 +3482,7 @@ static int MenuSettings()
|
|||||||
GuiImage page2dImg(&page2d);
|
GuiImage page2dImg(&page2d);
|
||||||
GuiButton page2Btn(page2.GetWidth(), page2.GetHeight());
|
GuiButton page2Btn(page2.GetWidth(), page2.GetHeight());
|
||||||
page2Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
page2Btn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
page2Btn.SetPosition(-201, 186);
|
page2Btn.SetPosition(202, 186);
|
||||||
page2Btn.SetImage(&page2dImg);
|
page2Btn.SetImage(&page2dImg);
|
||||||
page2Btn.SetSoundOver(&btnSoundOver);
|
page2Btn.SetSoundOver(&btnSoundOver);
|
||||||
page2Btn.SetSoundClick(&btnClick);
|
page2Btn.SetSoundClick(&btnClick);
|
||||||
@ -3558,17 +3560,19 @@ static int MenuSettings()
|
|||||||
w.Append(btnLogo);
|
w.Append(btnLogo);
|
||||||
|
|
||||||
mainWindow->Append(&w);
|
mainWindow->Append(&w);
|
||||||
|
mainWindow->Append(&optionBrowser2);
|
||||||
mainWindow->Append(&page2Btn);
|
mainWindow->Append(&page2Btn);
|
||||||
mainWindow->Append(&page1Btn);
|
mainWindow->Append(&page1Btn);
|
||||||
mainWindow->Append(&optionBrowser2);
|
|
||||||
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
}
|
}
|
||||||
else if ( pageToDisplay == 2 )
|
else if ( pageToDisplay == 2 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
mainWindow->Append(&optionBrowser2);
|
||||||
mainWindow->Append(&page1Btn);
|
mainWindow->Append(&page1Btn);
|
||||||
mainWindow->Append(&page2Btn);
|
mainWindow->Append(&page2Btn);
|
||||||
mainWindow->Append(&optionBrowser2);
|
|
||||||
|
|
||||||
sprintf(options2.name[0], "Password");
|
sprintf(options2.name[0], "Password");
|
||||||
sprintf(options2.name[1], "Boot/Standard");
|
sprintf(options2.name[1], "Boot/Standard");
|
||||||
|
Loading…
Reference in New Issue
Block a user