mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-25 03:15:24 -05:00
add option to hide pid/ec
hides pid & ec in pkmeditor, gamesync & securevalue in saveditor easier to share screenshots/stream without leaking identifying information fix auto-centering of pkmeditor subwindows when a savefile is detected on program load(tab_otmisc isn't initialized and reads an incorrect width)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
<setting name="ShowEggSpriteAsHeldItem" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="HideSecretDetails" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</PKHeX.WinForms.Properties.Settings>
|
||||
</userSettings>
|
||||
<runtime>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,7 +23,9 @@ public partial class SAVEditor : UserControl, ISlotViewer<PictureBox>, 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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
12
PKHeX.WinForms/Properties/Settings.Designer.cs
generated
12
PKHeX.WinForms/Properties/Settings.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,5 +47,8 @@
|
||||
<Setting Name="ShowEggSpriteAsHeldItem" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="HideSecretDetails" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Reference in New Issue
Block a user