mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 17:59:16 +01:00
apply underscore fix to gamelist and game prompt. Fix bugs in mp3 player.
This commit is contained in:
parent
f493f3c2f5
commit
e843d9a3be
@ -136,6 +136,12 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
|||||||
gameTxt[i] = new GuiText(buffer, 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
|
gameTxt[i] = new GuiText(buffer, 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
|
||||||
gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
gameTxt[i]->SetPosition(24,0);
|
gameTxt[i]->SetPosition(24,0);
|
||||||
|
char* pch;
|
||||||
|
|
||||||
|
pch=strrchr((buffer),'_');
|
||||||
|
|
||||||
|
if (pch!=NULL){gameTxt[i]->SetPosition(24, 15);}
|
||||||
|
else {gameTxt[i]->SetPosition(24, 0);}
|
||||||
|
|
||||||
gameBg[i] = new GuiImage(bgGamesEntry);
|
gameBg[i] = new GuiImage(bgGamesEntry);
|
||||||
|
|
||||||
@ -351,6 +357,12 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gameTxt[i]->SetText(buffer);
|
gameTxt[i]->SetText(buffer);
|
||||||
|
char* pch;
|
||||||
|
|
||||||
|
pch=strrchr((buffer),'_');
|
||||||
|
|
||||||
|
if (pch!=NULL){gameTxt[i]->SetPosition(24, 15);}
|
||||||
|
else {gameTxt[i]->SetPosition(24, 0);}
|
||||||
gameIndex[i] = next;
|
gameIndex[i] = next;
|
||||||
next = this->FindMenuItem(next, 1);
|
next = this->FindMenuItem(next, 1);
|
||||||
}
|
}
|
||||||
|
@ -845,6 +845,13 @@ int GameWindowPrompt()
|
|||||||
diskImg.SetImage(diskCover);
|
diskImg.SetImage(diskCover);
|
||||||
sizeTxt.SetText(sizeText);
|
sizeTxt.SetText(sizeText);
|
||||||
msgTxt.SetText(gameName);
|
msgTxt.SetText(gameName);
|
||||||
|
char* pch;
|
||||||
|
|
||||||
|
pch=strrchr((gameName),'_');
|
||||||
|
|
||||||
|
if (pch!=NULL){msgTxt.SetPosition(0, 16);}
|
||||||
|
else {msgTxt.SetPosition(0, 1);}
|
||||||
|
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
mainWindow->SetState(STATE_DISABLED);
|
mainWindow->SetState(STATE_DISABLED);
|
||||||
@ -4556,7 +4563,7 @@ int MenuMp3()
|
|||||||
cancelBtn.SetTrigger(&trigA);
|
cancelBtn.SetTrigger(&trigA);
|
||||||
cancelBtn.SetEffectGrow();
|
cancelBtn.SetEffectGrow();
|
||||||
|
|
||||||
bool isplaying = false;
|
// bool isplaying = false;
|
||||||
int songPlaying=0;
|
int songPlaying=0;
|
||||||
|
|
||||||
GuiTrigger trigHome;
|
GuiTrigger trigHome;
|
||||||
@ -4570,7 +4577,7 @@ int MenuMp3()
|
|||||||
GuiTrigger trigPlus;
|
GuiTrigger trigPlus;
|
||||||
trigPlus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0);
|
trigPlus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0);
|
||||||
|
|
||||||
int playerIsUp=0;
|
// int playerIsUp=0;
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sarrow_next.png", CFG.theme_path);
|
snprintf(imgPath, sizeof(imgPath), "%sarrow_next.png", CFG.theme_path);
|
||||||
GuiImageData next(imgPath, arrow_next_png);
|
GuiImageData next(imgPath, arrow_next_png);
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sarrow_previous.png", CFG.theme_path);
|
snprintf(imgPath, sizeof(imgPath), "%sarrow_previous.png", CFG.theme_path);
|
||||||
@ -4685,6 +4692,7 @@ int MenuMp3()
|
|||||||
{
|
{
|
||||||
StopMp3();
|
StopMp3();
|
||||||
songPlaying++;
|
songPlaying++;
|
||||||
|
if (songPlaying>(countmp3 - 1)){songPlaying=0;}
|
||||||
//ret = (optionBrowser4.GetSelectedOption()+1);
|
//ret = (optionBrowser4.GetSelectedOption()+1);
|
||||||
sprintf(fullpath,"%s%s", mp3path,mp3files[songPlaying]);
|
sprintf(fullpath,"%s%s", mp3path,mp3files[songPlaying]);
|
||||||
PlayMp3(fullpath);
|
PlayMp3(fullpath);
|
||||||
@ -4696,6 +4704,7 @@ int MenuMp3()
|
|||||||
{
|
{
|
||||||
StopMp3();
|
StopMp3();
|
||||||
songPlaying--;
|
songPlaying--;
|
||||||
|
if (songPlaying<0){songPlaying=(countmp3 - 1);}
|
||||||
//ret = (optionBrowser4.GetSelectedOption()-1);
|
//ret = (optionBrowser4.GetSelectedOption()-1);
|
||||||
sprintf(fullpath,"%s%s", mp3path,mp3files[songPlaying]);
|
sprintf(fullpath,"%s%s", mp3path,mp3files[songPlaying]);
|
||||||
PlayMp3(fullpath);
|
PlayMp3(fullpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user