diff --git a/PKHeX.Core/Resources/text/de/lang_de.txt b/PKHeX.Core/Resources/text/de/lang_de.txt index 4a21a3d29..d77cead0d 100644 --- a/PKHeX.Core/Resources/text/de/lang_de.txt +++ b/PKHeX.Core/Resources/text/de/lang_de.txt @@ -1106,6 +1106,7 @@ SAV_ZygardeCell.L_Collected=Collected: SettingsEditor.ApplyMarkings=Apply Markings on Import SettingsEditor.FlagIllegal=Flag Illegal SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/en/lang_en.txt b/PKHeX.Core/Resources/text/en/lang_en.txt index 15843728d..741fc835e 100644 --- a/PKHeX.Core/Resources/text/en/lang_en.txt +++ b/PKHeX.Core/Resources/text/en/lang_en.txt @@ -1102,6 +1102,7 @@ SAV_ZygardeCell.L_Collected=Collected: SettingsEditor.ApplyMarkings=Apply Markings on Import SettingsEditor.FlagIllegal=Flag Illegal SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/es/lang_es.txt b/PKHeX.Core/Resources/text/es/lang_es.txt index d10681e4e..bac539b15 100644 --- a/PKHeX.Core/Resources/text/es/lang_es.txt +++ b/PKHeX.Core/Resources/text/es/lang_es.txt @@ -1102,6 +1102,7 @@ SAV_ZygardeCell.L_Collected=Colectado: SettingsEditor.ApplyMarkings=Aplicar marcadores al importar SettingsEditor.FlagIllegal=Flag ilegal SettingsEditor.HideSAVDetails=Ocultar detalles de partidas guardadas en el título del programa +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Mostrar brillo PKM al pasar el ratón SettingsEditor.HoverSlotPlayCry=Reproducir grito PKM al pasar el ratón SettingsEditor.HoverSlotShowText=Mostrar info. PKM al pasar el ratón diff --git a/PKHeX.Core/Resources/text/fr/lang_fr.txt b/PKHeX.Core/Resources/text/fr/lang_fr.txt index 6df4334ab..b2a63d93e 100644 --- a/PKHeX.Core/Resources/text/fr/lang_fr.txt +++ b/PKHeX.Core/Resources/text/fr/lang_fr.txt @@ -1106,6 +1106,7 @@ SAV_ZygardeCell.L_Collected=Collected: SettingsEditor.ApplyMarkings=Appliquer des marques de l'importation SettingsEditor.FlagIllegal=Flag Illegal SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/it/lang_it.txt b/PKHeX.Core/Resources/text/it/lang_it.txt index 088ce0194..cb5fa8f39 100644 --- a/PKHeX.Core/Resources/text/it/lang_it.txt +++ b/PKHeX.Core/Resources/text/it/lang_it.txt @@ -1112,6 +1112,7 @@ SAV_ZygardeCell.L_Collected=Collected: SettingsEditor.ApplyMarkings=Apply Markings on Import SettingsEditor.FlagIllegal=Flag Illegal SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/ja/lang_ja.txt b/PKHeX.Core/Resources/text/ja/lang_ja.txt index 9aa91ab24..8f0cc764a 100644 --- a/PKHeX.Core/Resources/text/ja/lang_ja.txt +++ b/PKHeX.Core/Resources/text/ja/lang_ja.txt @@ -1106,6 +1106,7 @@ SAV_ZygardeCell.L_Collected=回収 SettingsEditor.ApplyMarkings=Apply Markings on Import SettingsEditor.FlagIllegal=不整合を表示 SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/ko/lang_ko.txt b/PKHeX.Core/Resources/text/ko/lang_ko.txt index cbd21990e..52ac489a2 100644 --- a/PKHeX.Core/Resources/text/ko/lang_ko.txt +++ b/PKHeX.Core/Resources/text/ko/lang_ko.txt @@ -1102,6 +1102,7 @@ SAV_ZygardeCell.L_Collected=Collected: SettingsEditor.ApplyMarkings=가져오기 중 마킹하기 SettingsEditor.FlagIllegal=Flag Illegal SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.Core/Resources/text/zh/lang_zh.txt b/PKHeX.Core/Resources/text/zh/lang_zh.txt index 8953dcb46..35450ef0b 100644 --- a/PKHeX.Core/Resources/text/zh/lang_zh.txt +++ b/PKHeX.Core/Resources/text/zh/lang_zh.txt @@ -1102,6 +1102,7 @@ SAV_ZygardeCell.L_Collected=收集了: SettingsEditor.ApplyMarkings=导入时标记 SettingsEditor.FlagIllegal=标记不合法 SettingsEditor.HideSAVDetails=Hide Save File Details in Program Title +SettingsEditor.HideSecretDetails=Hide Secret Details in Editors SettingsEditor.HoverSlotGlowEdges=Show PKM Glow on Hover SettingsEditor.HoverSlotPlayCry=Play PKM Slot Cry on Hover SettingsEditor.HoverSlotShowText=Show PKM Slot ToolTip on Hover diff --git a/PKHeX.WinForms/App.config b/PKHeX.WinForms/App.config index 98ee71f8f..6f826bbca 100644 --- a/PKHeX.WinForms/App.config +++ b/PKHeX.WinForms/App.config @@ -52,6 +52,9 @@ True + + False + diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index e9edee66a..302930de3 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -63,6 +63,8 @@ private void SavePartyStats(PKM pk) public PKM CurrentPKM { get => FieldsInitialized ? PreparePKM() : pkm; set => pkm = value; } public bool ModifyPKM { private get; set; } = true; + private bool _hideSecret; + public bool HideSecretValues { private get => _hideSecret; set => ToggleSecrets(_hideSecret = value, RequestSaveFile.Generation); } public bool Unicode { get; set; } = true; public bool HaX { get; set; } public byte[] LastData { private get; set; } @@ -1569,10 +1571,16 @@ private void ToggleInterface(PKM t) ToggleInterface(pkm.Format); } + private void ToggleSecrets(bool hidden, int gen) + { + Label_EncryptionConstant.Visible = BTN_RerollEC.Visible = TB_EC.Visible = gen >= 6 && !hidden; + BTN_RerollPID.Visible = Label_PID.Visible = TB_PID.Visible = gen >= 3 && !hidden; + } + private void ToggleInterface(int gen) { + ToggleSecrets(HideSecretValues, gen); FLP_Country.Visible = FLP_SubRegion.Visible = FLP_3DSRegion.Visible = gen >= 6; - Label_EncryptionConstant.Visible = BTN_RerollEC.Visible = TB_EC.Visible = gen >= 6; GB_nOT.Visible = GB_RelearnMoves.Visible = BTN_Medals.Visible = BTN_History.Visible = gen >= 6; PB_MarkPentagon.Visible = gen >= 6; @@ -1591,7 +1599,6 @@ private void ToggleInterface(int gen) GB_Markings.Visible = gen >= 3; BTN_Ribbons.Visible = gen >= 3; CB_Form.Enabled = gen >= 3; - BTN_RerollPID.Visible = Label_PID.Visible = TB_PID.Visible = gen >= 3; FLP_FriendshipForm.Visible = gen >= 2; FLP_HeldItem.Visible = gen >= 2; @@ -1658,7 +1665,7 @@ private bool FinalizeInterface(SaveFile sav) private void CenterSubEditors() { // Recenter PKM SubEditors - FLP_PKMEditors.Location = new Point((Tab_OTMisc.Width - FLP_PKMEditors.Width) / 2, FLP_PKMEditors.Location.Y); + FLP_PKMEditors.Location = new Point((tabMain.TabPages[0].Width - FLP_PKMEditors.Width) / 2, FLP_PKMEditors.Location.Y); } // Loading Setup diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs index a5aedcb76..b721f3599 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs @@ -23,7 +23,9 @@ public partial class SAVEditor : UserControl, ISlotViewer, ISaveFile public readonly BoxMenuStrip SortMenu; public bool HaX; - public bool ModifyPKM; + public bool ModifyPKM { private get; set; } + private bool _hideSecret; + public bool HideSecretDetails { private get => _hideSecret; set => ToggleSecrets(SAV, _hideSecret = value); } public ToolStripMenuItem Menu_Redo; public ToolStripMenuItem Menu_Undo; private bool FieldsLoaded; @@ -1054,8 +1056,7 @@ private void ToggleViewSubEditors(SaveFile sav) private void ToggleViewMisc(SaveFile sav) { // Generational Interface - TB_Secure1.Visible = TB_Secure2.Visible = L_Secure1.Visible = L_Secure2.Visible = sav.Exportable && sav.Generation >= 6; - TB_GameSync.Visible = L_GameSync.Visible = sav.Exportable && sav.Generation >= 6; + ToggleSecrets(sav, HideSecretDetails); B_VerifyCHK.Enabled = SAV.Exportable; if (sav is SAV4BR br) @@ -1090,6 +1091,12 @@ private void ToggleViewMisc(SaveFile sav) } } + private void ToggleSecrets(SaveFile sav, bool hide) + { + TB_Secure1.Visible = TB_Secure2.Visible = L_Secure1.Visible = L_Secure2.Visible = sav.Exportable && sav.Generation >= 6 && !hide; + TB_GameSync.Visible = L_GameSync.Visible = sav.Exportable && sav.Generation >= 6 && !hide; + } + // DragDrop private void MultiDragOver(object sender, DragEventArgs e) { diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index f74d65ddd..832e42ef3 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -240,13 +240,7 @@ private void FormLoadConfig(out bool BAKprompt, out bool showChangelog) var Settings = Properties.Settings.Default; Settings.Upgrade(); - PKME_Tabs.Unicode = Unicode = Settings.Unicode; - PKME_Tabs.UpdateUnicode(GenderSymbols); - CommonEdits.ShowdownSetIVMarkings = Settings.ApplyMarkings; - SaveFile.SetUpdateDex = Settings.SetUpdateDex; - SaveFile.SetUpdatePKM = C_SAV.ModifyPKM = PKME_Tabs.ModifyPKM = Settings.SetUpdatePKM; - C_SAV.FlagIllegal = Settings.FlagIllegal; - PKX.AllowShinySprite = Settings.ShinySprites; + ReloadProgramSettings(Settings); // Select Language string l = Settings.Language; @@ -367,21 +361,27 @@ private void MainMenuSettings(object sender, EventArgs e) // Reload text (if OT details hidden) Text = GetProgramTitle(C_SAV.SAV); // Update final settings - PKX.AllowShinySprite = Settings.Default.ShinySprites; - SaveFile.SetUpdateDex = Settings.Default.SetUpdateDex; - SaveFile.SetUpdatePKM = Settings.Default.SetUpdatePKM; - CommonEdits.ShowdownSetIVMarkings = Settings.Default.ApplyMarkings; - PKME_Tabs.Unicode = Unicode = Settings.Default.Unicode; - C_SAV.FlagIllegal = Settings.Default.FlagIllegal; - C_SAV.M.GlowHover = Settings.Default.HoverSlotGlowEdges; - SpriteBuilder.ShowEggSpriteAsItem = Settings.Default.ShowEggSpriteAsHeldItem; + ReloadProgramSettings(Settings.Default); - PKME_Tabs.UpdateUnicode(GenderSymbols); PKME_Tabs_UpdatePreviewSprite(sender, e); if (C_SAV.SAV.HasBox) C_SAV.ReloadSlots(); } + private void ReloadProgramSettings(Settings settings) + { + PKME_Tabs.Unicode = Unicode = settings.Unicode; + PKME_Tabs.UpdateUnicode(GenderSymbols); + PKX.AllowShinySprite = settings.ShinySprites; + SaveFile.SetUpdateDex = settings.SetUpdateDex; + SaveFile.SetUpdatePKM = C_SAV.ModifyPKM = PKME_Tabs.ModifyPKM = settings.SetUpdatePKM; + CommonEdits.ShowdownSetIVMarkings = settings.ApplyMarkings; + C_SAV.FlagIllegal = settings.FlagIllegal; + C_SAV.M.GlowHover = settings.HoverSlotGlowEdges; + SpriteBuilder.ShowEggSpriteAsItem = settings.ShowEggSpriteAsHeldItem; + PKME_Tabs.HideSecretValues = C_SAV.HideSecretDetails = settings.HideSecretDetails; + } + private void MainMenuBoxLoad(object sender, EventArgs e) { string path = null; diff --git a/PKHeX.WinForms/Properties/Settings.Designer.cs b/PKHeX.WinForms/Properties/Settings.Designer.cs index 42a69054c..7bfc1b1a2 100644 --- a/PKHeX.WinForms/Properties/Settings.Designer.cs +++ b/PKHeX.WinForms/Properties/Settings.Designer.cs @@ -202,5 +202,17 @@ internal sealed partial class Settings : global::System.Configuration.Applicatio this["ShowEggSpriteAsHeldItem"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool HideSecretDetails { + get { + return ((bool)(this["HideSecretDetails"])); + } + set { + this["HideSecretDetails"] = value; + } + } } } diff --git a/PKHeX.WinForms/Properties/Settings.settings b/PKHeX.WinForms/Properties/Settings.settings index 972dc2ba3..3e03a4930 100644 --- a/PKHeX.WinForms/Properties/Settings.settings +++ b/PKHeX.WinForms/Properties/Settings.settings @@ -47,5 +47,8 @@ True + + False + \ No newline at end of file