- Added widescreen fix to the arrow buttons one game window

- Added exit menu to the settings (no more going back to main menu needed to exit the loader)
- Changed the buttons for gamelist (favorites, sort by name etc.)
This commit is contained in:
mauricewoelk 2009-05-24 13:59:09 +00:00
parent c6fdedb008
commit 1e24620c2b
11 changed files with 161 additions and 29 deletions

View File

@ -263,4 +263,25 @@ extern const u32 abcIcon_png_size;
extern const u8 playCountIcon_png[]; extern const u8 playCountIcon_png[];
extern const u32 playCountIcon_png_size; extern const u32 playCountIcon_png_size;
extern const u8 arrangeGrid_png[];
extern const u32 arrangeGrid_png_size;
extern const u8 arrangeCarosselle_png[];
extern const u32 arrangeCarosselle_png_size;
extern const u8 favIcon_gray_png[];
extern const u32 favIcon_gray_png_size;
extern const u8 abcIcon_gray_png[];
extern const u32 abcIcon_gray_png_size;
extern const u8 playCountIcon_gray_png[];
extern const u32 playCountIcon_gray_png_size;
extern const u8 arrangeGrid_gray_png[];
extern const u32 arrangeGrid_gray_png_size;
extern const u8 arrangeCarosselle_gray_png[];
extern const u32 arrangeCarosselle_gray_png_size;
#endif #endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 778 B

View File

@ -1130,6 +1130,10 @@ int GameWindowPrompt()
btnFavorite.SetEffectGrow(); btnFavorite.SetEffectGrow();
GuiImage btnLeftImg(&imgLeft); GuiImage btnLeftImg(&imgLeft);
if (Settings.wsprompt == yes)
{
btnLeftImg.SetWidescreen(CFG.widescreen);
}
GuiButton btnLeft(imgLeft.GetWidth(), imgLeft.GetHeight()); GuiButton btnLeft(imgLeft.GetWidth(), imgLeft.GetHeight());
btnLeft.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); btnLeft.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
btnLeft.SetPosition(20, 0); btnLeft.SetPosition(20, 0);
@ -1141,6 +1145,10 @@ int GameWindowPrompt()
btnLeft.SetEffectGrow(); btnLeft.SetEffectGrow();
GuiImage btnRightImg(&imgRight); GuiImage btnRightImg(&imgRight);
if (Settings.wsprompt == yes)
{
btnRightImg.SetWidescreen(CFG.widescreen);
}
GuiButton btnRight(imgRight.GetWidth(), imgRight.GetHeight()); GuiButton btnRight(imgRight.GetWidth(), imgRight.GetHeight());
btnRight.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); btnRight.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
btnRight.SetPosition(-20, 0); btnRight.SetPosition(-20, 0);
@ -2768,24 +2776,27 @@ static int MenuDiscList()
GuiImageData batteryRed(imgPath, battery_red_png); GuiImageData batteryRed(imgPath, battery_red_png);
snprintf(imgPath, sizeof(imgPath), "%sbattery_bar.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbattery_bar.png", CFG.theme_path);
GuiImageData batteryBar(imgPath, battery_bar_png); GuiImageData batteryBar(imgPath, battery_bar_png);
//NEW
/*snprintf(imgPath, sizeof(imgPath), "%sfavorite.png", CFG.theme_path);
GuiImageData imgFavoriteOn(imgPath, favorite_png);
snprintf(imgPath, sizeof(imgPath), "%snot_favorite.png", CFG.theme_path);
GuiImageData imgFavoriteOff(imgPath, not_favorite_png);*/
snprintf(imgPath, sizeof(imgPath), "%sfavIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sfavIcon.png", CFG.theme_path);
GuiImageData imgfavIcon(imgPath, favIcon_png); GuiImageData imgfavIcon(imgPath, favIcon_png);
//snprintf(imgPath, sizeof(imgPath), "%snot_favorite.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sfavIcon_gray.png", CFG.theme_path);
//GuiImageData imgFavoriteOff(imgPath, not_favorite_png); GuiImageData imgfavIcon_gray(imgPath, favIcon_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sabcIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sabcIcon.png", CFG.theme_path);
GuiImageData imgabcIcon(imgPath, abcIcon_png); GuiImageData imgabcIcon(imgPath, abcIcon_png);
//snprintf(imgPath, sizeof(imgPath), "%snot_favorite.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sabcIcon_gray.png", CFG.theme_path);
//GuiImageData imgFavoriteOff(imgPath, not_favorite_png); GuiImageData imgabcIcon_gray(imgPath, abcIcon_gray_png);
snprintf(imgPath, sizeof(imgPath), "%splayCountIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%splayCountIcon.png", CFG.theme_path);
GuiImageData imgplayCountIcon(imgPath, playCountIcon_png); GuiImageData imgplayCountIcon(imgPath, playCountIcon_png);
snprintf(imgPath, sizeof(imgPath), "%splayCountIcon_gray.png", CFG.theme_path);
GuiImageData imgplayCountIcon_gray(imgPath, playCountIcon_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid.png", CFG.theme_path);
GuiImageData imgarrangeGrid(imgPath, arrangeGrid_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid_gray.png", CFG.theme_path);
GuiImageData imgarrangeGrid_gray(imgPath, arrangeGrid_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle.png", CFG.theme_path);
GuiImageData imgarrangeCarosselle(imgPath, arrangeCarosselle_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle_gray.png", CFG.theme_path);
GuiImageData imgarrangeCarosselle_gray(imgPath, arrangeCarosselle_gray_png);
GuiTrigger trigA; GuiTrigger trigA;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
@ -2907,45 +2918,93 @@ static int MenuDiscList()
wiiBtn.SetTrigger(&trigA); wiiBtn.SetTrigger(&trigA);
GuiImage favoriteBtnImg(&imgfavIcon); GuiImage favoriteBtnImg(&imgfavIcon);
GuiImage favoriteBtnImg_g(&imgfavIcon_gray);
favoriteBtnImg.SetWidescreen(CFG.widescreen); favoriteBtnImg.SetWidescreen(CFG.widescreen);
GuiButton favoriteBtn(imgfavIcon.GetWidth(), imgfavIcon.GetHeight()); favoriteBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton favoriteBtn(favoriteBtnImg.GetWidth(), favoriteBtnImg.GetHeight());
favoriteBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE); favoriteBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE);
favoriteBtn.SetPosition(-80, 15); favoriteBtn.SetPosition(20, 15);
favoriteBtn.SetImage(&favoriteBtnImg); favoriteBtn.SetImage(&favoriteBtnImg_g);
favoriteBtn.SetSoundOver(&btnSoundOver); favoriteBtn.SetSoundOver(&btnSoundOver);
favoriteBtn.SetSoundClick(&btnClick); favoriteBtn.SetSoundClick(&btnClick);
favoriteBtn.SetTrigger(&trigA); favoriteBtn.SetTrigger(&trigA);
favoriteBtn.SetEffectGrow(); favoriteBtn.SetEffectGrow();
favoriteBtn.SetAlpha(70); favoriteBtn.SetAlpha(180);
GuiImage abcBtnImg(&imgabcIcon); GuiImage abcBtnImg(&imgabcIcon);
abcBtnImg.SetWidescreen(CFG.widescreen); abcBtnImg.SetWidescreen(CFG.widescreen);
GuiImage abcBtnImg_g(&imgabcIcon_gray);
abcBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton abcBtn(abcBtnImg.GetWidth(), abcBtnImg.GetHeight()); GuiButton abcBtn(abcBtnImg.GetWidth(), abcBtnImg.GetHeight());
abcBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE); abcBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE);
abcBtn.SetPosition(-30, 15); abcBtn.SetPosition(52, 15);
abcBtn.SetImage(&abcBtnImg); abcBtn.SetImage(&abcBtnImg_g);
abcBtn.SetSoundOver(&btnSoundOver); abcBtn.SetSoundOver(&btnSoundOver);
abcBtn.SetSoundClick(&btnClick); abcBtn.SetSoundClick(&btnClick);
abcBtn.SetTrigger(&trigA); abcBtn.SetTrigger(&trigA);
abcBtn.SetEffectGrow(); abcBtn.SetEffectGrow();
abcBtn.SetAlpha(70); abcBtn.SetAlpha(180);
GuiImage countBtnImg(&imgplayCountIcon); GuiImage countBtnImg(&imgplayCountIcon);
countBtnImg.SetWidescreen(CFG.widescreen); countBtnImg.SetWidescreen(CFG.widescreen);
GuiImage countBtnImg_g(&imgplayCountIcon_gray);
countBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton countBtn(countBtnImg.GetWidth(), countBtnImg.GetHeight()); GuiButton countBtn(countBtnImg.GetWidth(), countBtnImg.GetHeight());
countBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE); countBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE);
countBtn.SetPosition(10, 15); countBtn.SetPosition(84, 15);
countBtn.SetImage(&countBtnImg); countBtn.SetImage(&countBtnImg_g);
countBtn.SetImage(&countBtnImg_g);
countBtn.SetSoundOver(&btnSoundOver); countBtn.SetSoundOver(&btnSoundOver);
countBtn.SetSoundClick(&btnClick); countBtn.SetSoundClick(&btnClick);
countBtn.SetTrigger(&trigA); countBtn.SetTrigger(&trigA);
countBtn.SetEffectGrow(); countBtn.SetEffectGrow();
countBtn.SetAlpha(70); countBtn.SetAlpha(180);
if (Settings.fave)favoriteBtn.SetAlpha(255); //NEW
if (Settings.sort==all)abcBtn.SetAlpha(255); GuiImage gridBtnImg(&imgarrangeGrid);
else if (Settings.sort==pcount)countBtn.SetAlpha(255); gridBtnImg.SetWidescreen(CFG.widescreen);
GuiImage gridBtnImg_g(&imgarrangeGrid_gray);
gridBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton gridBtn(gridBtnImg.GetWidth(), gridBtnImg.GetHeight());
gridBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE);
gridBtn.SetPosition(116, 15);
gridBtn.SetImage(&gridBtnImg_g);
gridBtn.SetSoundOver(&btnSoundOver);
gridBtn.SetSoundClick(&btnClick);
gridBtn.SetTrigger(&trigA);
gridBtn.SetEffectGrow();
gridBtn.SetAlpha(180);
GuiImage carosselleBtnImg(&imgarrangeCarosselle);
carosselleBtnImg.SetWidescreen(CFG.widescreen);
GuiImage carosselleBtnImg_g(&imgarrangeCarosselle_gray);
carosselleBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton carosselleBtn(carosselleBtnImg.GetWidth(), carosselleBtnImg.GetHeight());
carosselleBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);//(ALIGN_CENTRE, ALIGN_MIDDLE);
carosselleBtn.SetPosition(148, 15);
carosselleBtn.SetImage(&carosselleBtnImg_g);
carosselleBtn.SetSoundOver(&btnSoundOver);
carosselleBtn.SetSoundClick(&btnClick);
carosselleBtn.SetTrigger(&trigA);
carosselleBtn.SetEffectGrow();
carosselleBtn.SetAlpha(180);
if (Settings.fave)
{
favoriteBtn.SetImage(&favoriteBtnImg);
favoriteBtn.SetAlpha(255);
}
if (Settings.sort==all)
{
abcBtn.SetImage(&abcBtnImg);
abcBtn.SetAlpha(255);
}
else if (Settings.sort==pcount)
{
countBtn.SetImage(&countBtnImg);
countBtn.SetAlpha(255);
}
//Downloading Covers //Downloading Covers
GuiTooltip DownloadBtnTT(LANGUAGE.ClicktoDownloadCovers); GuiTooltip DownloadBtnTT(LANGUAGE.ClicktoDownloadCovers);
@ -3001,6 +3060,9 @@ static int MenuDiscList()
w.Append(&favoriteBtn); w.Append(&favoriteBtn);
w.Append(&abcBtn); w.Append(&abcBtn);
w.Append(&countBtn); w.Append(&countBtn);
//NEW
w.Append(&gridBtn);
w.Append(&carosselleBtn);
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24))
{ {
@ -3083,6 +3145,7 @@ static int MenuDiscList()
} }
} }
//BLA
else if(homeBtn.GetState() == STATE_CLICKED) else if(homeBtn.GetState() == STATE_CLICKED)
{ {
s32 thetimeofbg = bgMusic->GetPlayTime(); s32 thetimeofbg = bgMusic->GetPlayTime();
@ -3218,7 +3281,7 @@ static int MenuDiscList()
gamecntTxt.SetText(GamesCnt); gamecntTxt.SetText(GamesCnt);
selectedold = 1; selectedold = 1;
favoriteBtn.ResetState(); favoriteBtn.ResetState();
favoriteBtn.SetAlpha(Settings.fave ? 255 : 70); Settings.fave ? (favoriteBtn.SetImage(&favoriteBtnImg), favoriteBtn.SetAlpha(255)) : (favoriteBtn.SetImage(&favoriteBtnImg_g), favoriteBtn.SetAlpha(180));
} }
else if(abcBtn.GetState() == STATE_CLICKED) else if(abcBtn.GetState() == STATE_CLICKED)
@ -3231,8 +3294,10 @@ static int MenuDiscList()
__Menu_GetEntries(); __Menu_GetEntries();
gameBrowser.Reload(gameList, gameCnt); gameBrowser.Reload(gameList, gameCnt);
selectedold = 1; selectedold = 1;
abcBtn.SetImage(&abcBtnImg);
abcBtn.SetAlpha(255); abcBtn.SetAlpha(255);
countBtn.SetAlpha(70); countBtn.SetImage(&countBtnImg_g);
countBtn.SetAlpha(180);
} }
abcBtn.ResetState(); abcBtn.ResetState();
} }
@ -3247,7 +3312,9 @@ static int MenuDiscList()
__Menu_GetEntries(); __Menu_GetEntries();
gameBrowser.Reload(gameList, gameCnt); gameBrowser.Reload(gameList, gameCnt);
selectedold = 1; selectedold = 1;
abcBtn.SetAlpha(70); abcBtn.SetImage(&abcBtnImg_g);
abcBtn.SetAlpha(180);
countBtn.SetImage(&countBtnImg);
countBtn.SetAlpha(255); countBtn.SetAlpha(255);
} }
countBtn.ResetState(); countBtn.ResetState();
@ -3882,6 +3949,7 @@ static int MenuSettings()
int menu = MENU_NONE; int menu = MENU_NONE;
int ret; int ret;
char cfgtext[20]; char cfgtext[20];
int choice = 0; //BLA
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, vol);
GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol); GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, vol);
@ -3942,6 +4010,12 @@ static int MenuSettings()
backBtn.SetTrigger(&trigB); backBtn.SetTrigger(&trigB);
backBtn.SetEffectGrow(); backBtn.SetEffectGrow();
//BLA
GuiButton homo(1,1);
homo.SetTrigger(&trigHome);
homo.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
homo.SetPosition(0,0);
GuiImage tab1Img(&tab1); GuiImage tab1Img(&tab1);
GuiImage tab2Img(&tab2); GuiImage tab2Img(&tab2);
GuiImage tab3Img(&tab3); GuiImage tab3Img(&tab3);
@ -4039,6 +4113,7 @@ static int MenuSettings()
w.Append(&backBtn); w.Append(&backBtn);
w.Append(&lockBtn); w.Append(&lockBtn);
w.Append(btnLogo); w.Append(btnLogo);
w.Append(&homo);
//set triggers for tabs //set triggers for tabs
page1Btn.RemoveTrigger(1); page1Btn.RemoveTrigger(1);
page1Btn.RemoveTrigger(2); page1Btn.RemoveTrigger(2);
@ -4806,6 +4881,42 @@ static int MenuSettings()
} }
lockBtn.ResetState(); lockBtn.ResetState();
} }
//BLA
else if(homo.GetState() == STATE_CLICKED)
{
optionBrowser2.SetState(STATE_DISABLED);
s32 thetimeofbg = bgMusic->GetPlayTime();
bgMusic->Stop();
choice = WindowExitPrompt(LANGUAGE.ExitUSBISOLoader,0, LANGUAGE.BacktoLoader,LANGUAGE.WiiMenu,LANGUAGE.Back,0);
if(!strcmp("", CFG.oggload_path) || !strcmp("notset", CFG.ogg_path))
{
bgMusic->Play();
}
else
{
bgMusic->PlayOggFile(CFG.ogg_path);
}
bgMusic->SetPlayTime(thetimeofbg);
SetVolumeOgg(255*(vol/100.0));
if(choice == 3)
{
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); // Back to System Menu
}
else if (choice == 2)
{
if (*(unsigned int*) 0x80001800) exit(0);
// Channel Version
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}
else
{
homo.ResetState();
//optionBrowser2.SetState(STATE_DEFAULT);
//optionBrowser2.SetFocus(1);
}
}
if(settingsbackgroundbtn.GetState() == STATE_CLICKED) if(settingsbackgroundbtn.GetState() == STATE_CLICKED)
{ {
optionBrowser2.SetFocus(1); optionBrowser2.SetFocus(1);