mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 20:16:48 -05:00
Add a ChangeAllCount to current value dropdown
This commit is contained in:
@@ -442,6 +442,15 @@ public override void ClearDexEntryAll(int species)
|
||||
Array.Clear(Block.Data, ofs, EntrySize);
|
||||
}
|
||||
|
||||
public void SetAllBattledCount(uint count = 500)
|
||||
{
|
||||
foreach (var kvp in DexLookup)
|
||||
{
|
||||
var species = kvp.Key;
|
||||
SetBattledCount(species, count);
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly HashSet<int> SpeciesWithGigantamaxData = new HashSet<int>
|
||||
{
|
||||
(int)Species.Charizard,
|
||||
|
||||
@@ -74,6 +74,7 @@ private void InitializeComponent()
|
||||
this.CLB_4 = new System.Windows.Forms.CheckedListBox();
|
||||
this.CLB_1 = new System.Windows.Forms.CheckedListBox();
|
||||
this.CLB_2 = new System.Windows.Forms.CheckedListBox();
|
||||
this.mnuBattleCount = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GB_Language.SuspendLayout();
|
||||
this.modifyMenu.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Battled)).BeginInit();
|
||||
@@ -286,42 +287,43 @@ private void InitializeComponent()
|
||||
this.mnuSeenAll,
|
||||
this.mnuCaughtNone,
|
||||
this.mnuCaughtAll,
|
||||
this.mnuComplete});
|
||||
this.mnuComplete,
|
||||
this.mnuBattleCount});
|
||||
this.modifyMenu.Name = "modifyMenu";
|
||||
this.modifyMenu.Size = new System.Drawing.Size(149, 114);
|
||||
this.modifyMenu.Size = new System.Drawing.Size(202, 158);
|
||||
//
|
||||
// mnuSeenNone
|
||||
//
|
||||
this.mnuSeenNone.Name = "mnuSeenNone";
|
||||
this.mnuSeenNone.Size = new System.Drawing.Size(148, 22);
|
||||
this.mnuSeenNone.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuSeenNone.Text = "Seen none";
|
||||
this.mnuSeenNone.Click += new System.EventHandler(this.SeenNone);
|
||||
//
|
||||
// mnuSeenAll
|
||||
//
|
||||
this.mnuSeenAll.Name = "mnuSeenAll";
|
||||
this.mnuSeenAll.Size = new System.Drawing.Size(148, 22);
|
||||
this.mnuSeenAll.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuSeenAll.Text = "Seen all";
|
||||
this.mnuSeenAll.Click += new System.EventHandler(this.SeenAll);
|
||||
//
|
||||
// mnuCaughtNone
|
||||
//
|
||||
this.mnuCaughtNone.Name = "mnuCaughtNone";
|
||||
this.mnuCaughtNone.Size = new System.Drawing.Size(148, 22);
|
||||
this.mnuCaughtNone.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuCaughtNone.Text = "Caught none";
|
||||
this.mnuCaughtNone.Click += new System.EventHandler(this.CaughtNone);
|
||||
//
|
||||
// mnuCaughtAll
|
||||
//
|
||||
this.mnuCaughtAll.Name = "mnuCaughtAll";
|
||||
this.mnuCaughtAll.Size = new System.Drawing.Size(148, 22);
|
||||
this.mnuCaughtAll.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuCaughtAll.Text = "Caught all";
|
||||
this.mnuCaughtAll.Click += new System.EventHandler(this.CaughtAll);
|
||||
//
|
||||
// mnuComplete
|
||||
//
|
||||
this.mnuComplete.Name = "mnuComplete";
|
||||
this.mnuComplete.Size = new System.Drawing.Size(148, 22);
|
||||
this.mnuComplete.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuComplete.Text = "Complete Dex";
|
||||
this.mnuComplete.Click += new System.EventHandler(this.CompleteDex);
|
||||
//
|
||||
@@ -549,6 +551,13 @@ private void InitializeComponent()
|
||||
this.CLB_2.Size = new System.Drawing.Size(102, 374);
|
||||
this.CLB_2.TabIndex = 30;
|
||||
//
|
||||
// mnuBattleCount
|
||||
//
|
||||
this.mnuBattleCount.Name = "mnuBattleCount";
|
||||
this.mnuBattleCount.Size = new System.Drawing.Size(201, 22);
|
||||
this.mnuBattleCount.Text = "Change All Battle Count";
|
||||
this.mnuBattleCount.Click += new System.EventHandler(this.ChangeAllCounts);
|
||||
//
|
||||
// SAV_PokedexSWSH
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -638,5 +647,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.CheckedListBox CLB_1;
|
||||
private System.Windows.Forms.CheckedListBox CLB_2;
|
||||
private System.Windows.Forms.ComboBox CB_Gender;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuBattleCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,5 +226,13 @@ private void CompleteDex(object sender, EventArgs e)
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
GetEntry();
|
||||
}
|
||||
|
||||
private void ChangeAllCounts(object sender, EventArgs e)
|
||||
{
|
||||
SetEntry();
|
||||
Dex.SetAllBattledCount((uint)NUD_Battled.Value);
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
GetEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user