Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) (#1011)

* Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX)

* Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX)

* Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX)

* Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX)

* Add Spanish translation for "Hide SRAM Saving"
This commit is contained in:
saulfabreg Wii VC Project 2022-06-03 14:50:37 -05:00 committed by GitHub
parent 74d7dfd1a3
commit 411ff1c5c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 23 deletions

View File

@ -323,22 +323,28 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
{
if(listOffset+i < 0 && action == 1)
{
saveDate[0]->SetText(NULL);
saveDate[1]->SetText(NULL);
saveTime[0]->SetText("New");
saveTime[1]->SetText("New");
saveType[0]->SetText("SRAM");
saveType[1]->SetText("State");
saveType[0]->SetText("State");
savePreviewImg[0]->SetImage(gameSaveBlank);
savePreviewImg[1]->SetImage(gameSaveBlank);
saveBtn[0]->SetVisible(true);
saveBtn[1]->SetVisible(true);
if(saveBtn[0]->GetState() == STATE_DISABLED)
saveBtn[0]->SetState(STATE_DEFAULT);
if (GCSettings.HideSRAMSaving == 0)
{
saveDate[1]->SetText(NULL);
saveTime[1]->SetText("New");
saveType[1]->SetText("SRAM");
savePreviewImg[1]->SetImage(gameSaveBlank);
saveBtn[1]->SetVisible(true);
if(saveBtn[1]->GetState() == STATE_DISABLED)
saveBtn[1]->SetState(STATE_DEFAULT);
}
}
else if(listOffset+i < saves->length)
{
if(saveBtn[i]->GetState() == STATE_DISABLED || !saveBtn[i]->IsVisible())

View File

@ -265,6 +265,9 @@ msgstr "Alemán"
msgid "Go Back"
msgstr "Volver"
msgid "Hide SRAM Saving"
msgstr "Esconder Guardar SRAM"
msgid "Horizontal"
msgstr "Horizontal"

View File

@ -1987,20 +1987,7 @@ static int MenuGameSaves(int action)
}
else // save
{
if(ret == -2) // new SRAM
{
for(i=1; i < 100; i++)
if(saves.files[FILE_SRAM][i] == 0)
break;
if(i < 100)
{
MakeFilePath(filepath, FILE_SRAM, Memory.ROMFilename, i);
SaveSRAM(filepath, NOTSILENT);
menu = MENU_GAME_SAVE;
}
}
else if(ret == -1) // new State
if(ret == -2) // new State
{
for(i=1; i < 100; i++)
if(saves.files[FILE_SNAPSHOT][i] == 0)
@ -2009,7 +1996,20 @@ static int MenuGameSaves(int action)
if(i < 100)
{
MakeFilePath(filepath, FILE_SNAPSHOT, Memory.ROMFilename, i);
SaveSnapshot (filepath, NOTSILENT);
SaveSnapshot(filepath, NOTSILENT);
menu = MENU_GAME_SAVE;
}
}
else if(ret == -1 && GCSettings.HideSRAMSaving == 0) // new SRAM
{
for(i=1; i < 100; i++)
if(saves.files[FILE_SRAM][i] == 0)
break;
if(i < 100)
{
MakeFilePath(filepath, FILE_SRAM, Memory.ROMFilename, i);
SaveSRAM (filepath, NOTSILENT);
menu = MENU_GAME_SAVE;
}
}
@ -4232,6 +4232,7 @@ static int MenuSettingsMenu()
sprintf(options.name[i++], "Rumble");
sprintf(options.name[i++], "Language");
sprintf(options.name[i++], "Preview Image");
sprintf(options.name[i++], "Hide SRAM Saving");
options.length = i;
for(i=0; i < options.length; i++)
@ -4317,6 +4318,9 @@ static int MenuSettingsMenu()
if(GCSettings.PreviewImage > 2)
GCSettings.PreviewImage = 0;
break;
case 7:
GCSettings.HideSRAMSaving ^= 1;
break;
}
if(ret >= 0 || firstRun)
@ -4366,6 +4370,11 @@ static int MenuSettingsMenu()
else
sprintf (options.value[4], "Disabled");
if (GCSettings.HideSRAMSaving == 1)
sprintf (options.value[7], "On");
else
sprintf (options.value[7], "Off");
switch(GCSettings.language)
{
case LANG_JAPANESE: sprintf(options.value[5], "Japanese"); break;

View File

@ -168,6 +168,7 @@ preparePrefsData ()
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
createXMLSetting("language", "Language", toStr(GCSettings.language));
createXMLSetting("PreviewImage", "Preview Image", toStr(GCSettings.PreviewImage));
createXMLSetting("HideSRAMSaving", "Hide SRAM Saving", toStr(GCSettings.HideSRAMSaving));
createXMLSection("Controller", "Controller Settings");
@ -359,6 +360,7 @@ decodePrefsData ()
loadXMLSetting(&GCSettings.Rumble, "Rumble");
loadXMLSetting(&GCSettings.language, "language");
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
loadXMLSetting(&GCSettings.HideSRAMSaving, "HideSRAMSaving");
// Controller Settings
@ -466,6 +468,7 @@ DefaultSettings ()
GCSettings.SFXVolume = 40;
GCSettings.Rumble = 1;
GCSettings.PreviewImage = 0;
GCSettings.HideSRAMSaving = 0;
#ifdef HW_RVL
GCSettings.language = CONF_GetLanguage();

View File

@ -112,6 +112,7 @@ struct SGCSettings{
char ScreenshotsFolder[MAXPATHLEN]; // Path to screenshots files
char CoverFolder[MAXPATHLEN]; // Path to cover files
char ArtworkFolder[MAXPATHLEN]; // Path to artwork files
int HideSRAMSaving;
int AutoloadGame;
char smbip[80];