*Forgot to add block of HBC and Title Launcher, added now

*Resolve for Issue 1766 - You can now delete everything belonging to a game on deleting the game (covers/cheats/text codes...)
*Added dotted limit to the window prompt title text
This commit is contained in:
dimok321 2011-01-20 15:56:01 +00:00
parent 1f0df75ef8
commit a5822064f4
5 changed files with 57 additions and 32 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>2.0 r1047</version> <version>2.0 r1048</version>
<release_date>201101201253</release_date> <release_date>201101201504</release_date>
<no_ios_reload/> <no_ios_reload/>
<short_description>Loads games from USB-devices</short_description> <short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. <long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.

View File

@ -71,7 +71,8 @@ HomebrewBrowser::HomebrewBrowser()
channelBtn->SetSoundClick(btnSoundClick2); channelBtn->SetSoundClick(btnSoundClick2);
channelBtn->SetEffectGrow(); channelBtn->SetEffectGrow();
channelBtn->SetTrigger(trigA); channelBtn->SetTrigger(trigA);
Append(channelBtn); if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_TITLE_LAUNCHER_MENU))
Append(channelBtn);
MainButtonDesc.resize(HomebrewList->GetFilecount()); MainButtonDesc.resize(HomebrewList->GetFilecount());
MainButtonDescOver.resize(HomebrewList->GetFilecount()); MainButtonDescOver.resize(HomebrewList->GetFilecount());

View File

@ -651,7 +651,9 @@ void GameBrowseMenu::ReloadBrowser()
Append(gameInfo); Append(gameInfo);
Append(homeBtn); Append(homeBtn);
Append(settingsBtn); Append(settingsBtn);
Append(homebrewBtn);
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_HBC_MENU))
Append(homebrewBtn);
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAME_INSTALL)) if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAME_INSTALL))
Append(installBtn); Append(installBtn);

View File

@ -549,6 +549,7 @@ int WindowPrompt(const char *title, const char *msg, const char *btn1Label, cons
GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); GuiText titleTxt(title, 26, thColor("r=0 g=0 b=0 a=255 - prompt windows text color"));
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(0, 55); titleTxt.SetPosition(0, 55);
titleTxt.SetMaxWidth(430, DOTTED);
GuiText msgTxt(msg, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color")); GuiText msgTxt(msg, 22, thColor("r=0 g=0 b=0 a=255 - prompt windows text color"));
msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
msgTxt.SetPosition(0, -40); msgTxt.SetPosition(0, -40);

View File

@ -88,32 +88,50 @@ int UninstallSM::GetMenuInternal()
//! Settings: Uninstall Game //! Settings: Uninstall Game
if (ret == ++Idx) if (ret == ++Idx)
{ {
int choice = WindowPrompt(tr( "Do you really want to delete:" ), GameTitles.GetTitle(DiscHeader), tr( "Yes" ), tr( "Cancel" )); int choice = WindowPrompt(GameTitles.GetTitle(DiscHeader), tr( "What should be deleted for this game title:" ), tr( "Game Only" ), tr("Uninstall all"), tr( "Cancel" ));
if (choice == 1) if (choice == 0)
return MENU_NONE;
char GameID[7];
snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id);
std::string Title = GameTitles.GetTitle(DiscHeader);
GameSettings.Remove(DiscHeader->id);
GameSettings.Save();
GameStatistics.Remove(DiscHeader->id);
GameStatistics.Save();
int ret = 0;
if(!mountMethod)
ret = WBFS_RemoveGame(DiscHeader->id);
if(ret >= 0)
{ {
std::string Title = GameTitles.GetTitle(DiscHeader); wString oldFilter(gameList.GetCurrentFilter());
GameSettings.Remove(DiscHeader->id); gameList.ReadGameList();
GameSettings.Save(); gameList.FilterList(oldFilter.c_str());
GameStatistics.Remove(DiscHeader->id);
GameStatistics.Save();
int ret = 0;
if(!mountMethod)
ret = WBFS_RemoveGame(DiscHeader->id);
if(ret >= 0)
{
wString oldFilter(gameList.GetCurrentFilter());
gameList.ReadGameList();
gameList.FilterList(oldFilter.c_str());
}
if (ret < 0)
WindowPrompt(tr( "Can't delete:" ), Title.c_str(), tr( "OK" ));
else
WindowPrompt(tr( "Successfully deleted:" ), Title.c_str(), tr( "OK" ));
return MENU_DISCLIST;
} }
if(choice == 2)
{
char filepath[200];
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID);
if (CheckFile(filepath)) remove(filepath);
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID);
if (CheckFile(filepath)) remove(filepath);
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.disc_path, GameID);
if (CheckFile(filepath)) remove(filepath);
snprintf(filepath, sizeof(filepath), "%s%s.txt", Settings.TxtCheatcodespath, GameID);
if (CheckFile(filepath)) remove(filepath);
snprintf(filepath, sizeof(filepath), "%s%s.gct", Settings.Cheatcodespath, GameID);
if (CheckFile(filepath)) remove(filepath);
}
if (ret < 0)
WindowPrompt(tr( "Can't delete:" ), Title.c_str(), tr( "OK" ));
else
WindowPrompt(tr( "Successfully deleted:" ), Title.c_str(), tr( "OK" ));
return MENU_DISCLIST;
} }
//! Settings: Reset Playcounter //! Settings: Reset Playcounter
@ -130,14 +148,17 @@ int UninstallSM::GetMenuInternal()
//! Settings: Delete Cover Artwork //! Settings: Delete Cover Artwork
else if (ret == ++Idx) else if (ret == ++Idx)
{ {
int choice = WindowPrompt(tr( "Delete" ), tr("Are you sure?"), tr( "Yes" ), tr( "No" ));
if (choice != 1)
return MENU_NONE;
char GameID[7]; char GameID[7];
snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id); snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id);
char filepath[200]; char filepath[200];
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID); snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID);
if (CheckFile(filepath)) remove(filepath);
int choice = WindowPrompt(tr( "Delete" ), filepath, tr( "Yes" ), tr( "No" )); snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID);
if (choice == 1) if (CheckFile(filepath)) remove(filepath);
if (CheckFile(filepath)) remove(filepath);
} }
//! Settings: Delete Disc Artwork //! Settings: Delete Disc Artwork