Add shiny sprite toggle setting

not functional yet
#1735
This commit is contained in:
Kurt 2018-01-02 17:08:14 -08:00
parent 6a9e2ed4b9
commit ef0453ecf6
6 changed files with 47 additions and 6 deletions

View file

@ -31,6 +31,9 @@
<setting name="ModifyUnset" serializeAs="String">
<value>False</value>
</setting>
<setting name="ShinySprites" serializeAs="String">
<value>True</value>
</setting>
</PKHeX.WinForms.Properties.Settings>
</userSettings>
</configuration>

View file

@ -34,10 +34,14 @@ namespace PKHeX.WinForms.Controls
set
{
Box.FlagIllegal = value && !HaX;
UpdateBoxViewers(all: true);
ResetNonBoxSlots();
ReloadSlots();
}
}
public void ReloadSlots()
{
UpdateBoxViewers(all: true);
ResetNonBoxSlots();
}
public SAVEditor(SaveFile sav = null)
{

View file

@ -71,6 +71,7 @@
this.L_UpdateAvailable = new System.Windows.Forms.LinkLabel();
this.PKME_Tabs = new PKHeX.WinForms.Controls.PKMEditor();
this.C_SAV = new PKHeX.WinForms.Controls.SAVEditor();
this.Menu_ShinySprites = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dragout)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_Legal)).BeginInit();
@ -315,6 +316,8 @@
this.Menu_Language,
this.Menu_Modify,
this.Menu_Unicode,
this.Menu_ShinySprites,
this.Menu_FlagIllegal,
this.Menu_About});
this.Menu_Options.Name = "Menu_Options";
this.Menu_Options.Size = new System.Drawing.Size(61, 20);
@ -341,7 +344,6 @@
this.Menu_Modify.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.Menu_ModifyDex,
this.Menu_ModifyPKM,
this.Menu_FlagIllegal,
this.Menu_ModifyUnset,
this.Menu_Undo,
this.Menu_Redo});
@ -489,6 +491,15 @@
this.C_SAV.RequestReloadSave += new System.EventHandler(this.ClickSaveFileName);
this.C_SAV.RequestCloneData += new System.EventHandler(this.ClickClone);
//
// Menu_ShinySprites
//
this.Menu_ShinySprites.Checked = true;
this.Menu_ShinySprites.CheckState = System.Windows.Forms.CheckState.Checked;
this.Menu_ShinySprites.Name = "Menu_ShinySprites";
this.Menu_ShinySprites.Size = new System.Drawing.Size(152, 22);
this.Menu_ShinySprites.Text = "Shiny Sprites";
this.Menu_ShinySprites.Click += new System.EventHandler(this.MainMenuShinySprites);
//
// Main
//
this.AllowDrop = true;
@ -563,6 +574,7 @@
private System.Windows.Forms.ToolStripMenuItem Menu_Redo;
private System.Windows.Forms.ToolStripMenuItem Menu_FlagIllegal;
private System.Windows.Forms.ToolStripMenuItem Menu_ModifyUnset;
private System.Windows.Forms.ToolStripMenuItem Menu_ShinySprites;
}
}

View file

@ -249,7 +249,8 @@ namespace PKHeX.WinForms
SaveFile.SetUpdateDex = Menu_ModifyDex.Checked = Settings.SetUpdateDex;
SaveFile.SetUpdatePKM = C_SAV.ModifyPKM = PKME_Tabs.ModifyPKM = Menu_ModifyPKM.Checked = Settings.SetUpdatePKM;
C_SAV.FlagIllegal = Menu_FlagIllegal.Checked = Settings.FlagIllegal;
Menu_ModifyUnset.Checked = Settings.ModifyUnset;
PKX.AllowShinySprite = Menu_ModifyUnset.Checked = Settings.ShinySprites;
Menu_ShinySprites.Checked = Settings.ShinySprites;
// Select Language
string l = Settings.Language;
@ -353,7 +354,13 @@ namespace PKHeX.WinForms
private void MainMenuModifyDex(object sender, EventArgs e) => Settings.Default.SetUpdateDex = SaveFile.SetUpdateDex = Menu_ModifyDex.Checked;
private void MainMenuModifyUnset(object sender, EventArgs e) => Settings.Default.ModifyUnset = Menu_ModifyUnset.Checked;
private void MainMenuModifyPKM(object sender, EventArgs e) => Settings.Default.SetUpdatePKM = SaveFile.SetUpdatePKM = Menu_ModifyPKM.Checked;
private void MainMenuFlagIllegal(object sender, EventArgs e) => C_SAV.FlagIllegal = Settings.Default.FlagIllegal = Menu_FlagIllegal.Checked;
private void MainMenuFlagIllegal(object sender, EventArgs e) => Settings.Default.FlagIllegal = C_SAV.FlagIllegal = Menu_FlagIllegal.Checked;
private void MainMenuShinySprites(object sender, EventArgs e)
{
Settings.Default.ShinySprites = PKX.AllowShinySprite = Menu_ShinySprites.Checked;
C_SAV.ReloadSlots();
PKME_Tabs_UpdatePreviewSprite(sender, e);
}
private void MainMenuBoxLoad(object sender, EventArgs e)
{

View file

@ -12,7 +12,7 @@ namespace PKHeX.WinForms.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -118,5 +118,17 @@ namespace PKHeX.WinForms.Properties {
this["ModifyUnset"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ShinySprites {
get {
return ((bool)(this["ShinySprites"]));
}
set {
this["ShinySprites"] = value;
}
}
}
}

View file

@ -26,5 +26,8 @@
<Setting Name="ModifyUnset" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ShinySprites" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>