mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 11:19:17 +01:00
*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:
parent
1f0df75ef8
commit
a5822064f4
@ -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.
|
||||
|
@ -71,7 +71,8 @@ HomebrewBrowser::HomebrewBrowser()
|
||||
channelBtn->SetSoundClick(btnSoundClick2);
|
||||
channelBtn->SetEffectGrow();
|
||||
channelBtn->SetTrigger(trigA);
|
||||
Append(channelBtn);
|
||||
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_TITLE_LAUNCHER_MENU))
|
||||
Append(channelBtn);
|
||||
|
||||
MainButtonDesc.resize(HomebrewList->GetFilecount());
|
||||
MainButtonDescOver.resize(HomebrewList->GetFilecount());
|
||||
|
@ -651,7 +651,9 @@ void GameBrowseMenu::ReloadBrowser()
|
||||
Append(gameInfo);
|
||||
Append(homeBtn);
|
||||
Append(settingsBtn);
|
||||
Append(homebrewBtn);
|
||||
|
||||
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_HBC_MENU))
|
||||
Append(homebrewBtn);
|
||||
|
||||
if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_GAME_INSTALL))
|
||||
Append(installBtn);
|
||||
|
@ -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);
|
||||
|
@ -88,32 +88,50 @@ 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();
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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;
|
||||
wString oldFilter(gameList.GetCurrentFilter());
|
||||
gameList.ReadGameList();
|
||||
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
|
||||
WindowPrompt(tr( "Successfully deleted:" ), Title.c_str(), tr( "OK" ));
|
||||
|
||||
return MENU_DISCLIST;
|
||||
}
|
||||
|
||||
//! Settings: Reset Playcounter
|
||||
@ -130,14 +148,17 @@ 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);
|
||||
if (CheckFile(filepath)) remove(filepath);
|
||||
snprintf(filepath, sizeof(filepath), "%s%s.png", Settings.covers2d_path, GameID);
|
||||
if (CheckFile(filepath)) remove(filepath);
|
||||
}
|
||||
|
||||
//! Settings: Delete Disc Artwork
|
||||
|
Loading…
Reference in New Issue
Block a user