mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 21:36:43 -05:00
Adjust eggmove display
Add goto button to jump to the other tables
This commit is contained in:
15
pk3DS/Subforms/Gen7/EggMoveEditor7.Designer.cs
generated
15
pk3DS/Subforms/Gen7/EggMoveEditor7.Designer.cs
generated
@@ -43,6 +43,7 @@ private void InitializeComponent()
|
||||
this.PB_MonSprite = new System.Windows.Forms.PictureBox();
|
||||
this.NUD_FormTable = new System.Windows.Forms.NumericUpDown();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.B_Goto = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgv)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Moves)).BeginInit();
|
||||
@@ -210,7 +211,7 @@ private void InitializeComponent()
|
||||
//
|
||||
this.NUD_FormTable.Location = new System.Drawing.Point(305, 41);
|
||||
this.NUD_FormTable.Name = "NUD_FormTable";
|
||||
this.NUD_FormTable.Size = new System.Drawing.Size(52, 20);
|
||||
this.NUD_FormTable.Size = new System.Drawing.Size(47, 20);
|
||||
this.NUD_FormTable.TabIndex = 92;
|
||||
//
|
||||
// label1
|
||||
@@ -222,11 +223,22 @@ private void InitializeComponent()
|
||||
this.label1.TabIndex = 93;
|
||||
this.label1.Text = "FormTableReference";
|
||||
//
|
||||
// B_Goto
|
||||
//
|
||||
this.B_Goto.Location = new System.Drawing.Point(356, 41);
|
||||
this.B_Goto.Name = "B_Goto";
|
||||
this.B_Goto.Size = new System.Drawing.Size(39, 24);
|
||||
this.B_Goto.TabIndex = 94;
|
||||
this.B_Goto.Text = "goto";
|
||||
this.B_Goto.UseVisualStyleBackColor = true;
|
||||
this.B_Goto.Click += new System.EventHandler(this.B_Goto_Click);
|
||||
//
|
||||
// EggMoveEditor7
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(404, 412);
|
||||
this.Controls.Add(this.B_Goto);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.NUD_FormTable);
|
||||
this.Controls.Add(this.PB_MonSprite);
|
||||
@@ -271,5 +283,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.PictureBox PB_MonSprite;
|
||||
private System.Windows.Forms.NumericUpDown NUD_FormTable;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button B_Goto;
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,17 @@ public EggMoveEditor7()
|
||||
setupDGV();
|
||||
|
||||
var newlist = new List<Util.cbItem>();
|
||||
for (int i = 0; i < specieslist.Length; i++) // add all species & forms
|
||||
newlist.Add(new Util.cbItem { Text = specieslist[i] + $" ({i})", Value = i });
|
||||
for (int i = 0; i < species.Length; i++) // add all species & forms
|
||||
newlist.Add(new Util.cbItem { Text = species[i] + $" ({i})", Value = i });
|
||||
newlist = newlist.OrderBy(item => item.Text).ToList();
|
||||
for (int i = species.Length; i < files.Length; i++)
|
||||
newlist.Add(new Util.cbItem { Text = $"{i.ToString("0000")} - Extra", Value = i });
|
||||
NUD_FormTable.Maximum = files.Length;
|
||||
|
||||
CB_Species.DisplayMember = "Text";
|
||||
CB_Species.ValueMember = "Value";
|
||||
CB_Species.DataSource = newlist.OrderBy(item => item.Text).ToList();
|
||||
CB_Species.DataSource = newlist;
|
||||
|
||||
NUD_FormTable.Maximum = files.Length;
|
||||
|
||||
CB_Species.SelectedIndex = 0;
|
||||
}
|
||||
@@ -60,10 +63,11 @@ private void setupDGV()
|
||||
private void getList()
|
||||
{
|
||||
entry = Util.getIndex(CB_Species);
|
||||
int s = baseForms[entry];
|
||||
int f = formVal[entry];
|
||||
int s = 0, f = 0;
|
||||
if (entry <= Main.Config.MaxSpeciesID)
|
||||
{
|
||||
s = entry;
|
||||
}
|
||||
int[] specForm = { s, f };
|
||||
string filename = "_" + specForm[0] + (entry > Main.Config.MaxSpeciesID ? "_" + (specForm[1] + 1) : "");
|
||||
PB_MonSprite.Image = (Bitmap)Resources.ResourceManager.GetObject(filename);
|
||||
@@ -176,6 +180,12 @@ private void formClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
setList();
|
||||
}
|
||||
|
||||
private void B_Goto_Click(object sender, EventArgs e)
|
||||
{
|
||||
CB_Species.SelectedValue = (int)NUD_FormTable.Value;
|
||||
}
|
||||
|
||||
private void calcStats()
|
||||
{
|
||||
Move[] MoveData = MoveEditor6.getMoves();
|
||||
|
||||
Reference in New Issue
Block a user