*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">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>2.0 r1047</version>
<release_date>201101201253</release_date>
<version>2.0 r1048</version>
<release_date>201101201504</release_date>
<no_ios_reload/>
<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.

View File

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

View File

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

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"));
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
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"));
msgTxt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
msgTxt.SetPosition(0, -40);

View File

@ -88,9 +88,13 @@ int UninstallSM::GetMenuInternal()
//! Settings: Uninstall Game
if (ret == ++Idx)
{
int choice = WindowPrompt(tr( "Do you really want to delete:" ), GameTitles.GetTitle(DiscHeader), tr( "Yes" ), tr( "Cancel" ));
if (choice == 1)
{
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 == 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();
@ -107,6 +111,21 @@ int UninstallSM::GetMenuInternal()
gameList.FilterList(oldFilter.c_str());
}
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
@ -114,7 +133,6 @@ int UninstallSM::GetMenuInternal()
return MENU_DISCLIST;
}
}
//! Settings: Reset Playcounter
else if (ret == ++Idx)
@ -130,13 +148,16 @@ int UninstallSM::GetMenuInternal()
//! Settings: Delete Cover Artwork
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];
snprintf(GameID, sizeof(GameID), "%s", (char *) DiscHeader->id);
char filepath[200];
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers_path, GameID);
int choice = WindowPrompt(tr( "Delete" ), filepath, tr( "Yes" ), tr( "No" ));
if (choice == 1)
if (CheckFile(filepath)) remove(filepath);
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID);
if (CheckFile(filepath)) remove(filepath);
}