From 488455e268bf1675bc34d7792a69346a596088e4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 26 Nov 2016 19:41:17 -0800 Subject: [PATCH] Add ball sprite indication Closes #505 Not gonna do shiny sprites, as they are fan-colored and not ripped from the game data. --- PKHeX/MainWindow/Main.Designer.cs | 40 +- PKHeX/MainWindow/Main.cs | 4 + PKHeX/MainWindow/Main.resx | 787 ++++++++++++++++++++++++- PKHeX/PKHeX.csproj | 78 +++ PKHeX/PKM/PKX.cs | 4 + PKHeX/Properties/Resources.Designer.cs | 260 ++++++++ PKHeX/Properties/Resources.resx | 78 +++ PKHeX/Resources/img/ball/_ball1.png | Bin 0 -> 383 bytes PKHeX/Resources/img/ball/_ball10.png | Bin 0 -> 396 bytes PKHeX/Resources/img/ball/_ball11.png | Bin 0 -> 426 bytes PKHeX/Resources/img/ball/_ball12.png | Bin 0 -> 330 bytes PKHeX/Resources/img/ball/_ball13.png | Bin 0 -> 427 bytes PKHeX/Resources/img/ball/_ball14.png | Bin 0 -> 408 bytes PKHeX/Resources/img/ball/_ball15.png | Bin 0 -> 388 bytes PKHeX/Resources/img/ball/_ball16.png | Bin 0 -> 365 bytes PKHeX/Resources/img/ball/_ball17.png | Bin 0 -> 383 bytes PKHeX/Resources/img/ball/_ball18.png | Bin 0 -> 385 bytes PKHeX/Resources/img/ball/_ball19.png | Bin 0 -> 389 bytes PKHeX/Resources/img/ball/_ball2.png | Bin 0 -> 390 bytes PKHeX/Resources/img/ball/_ball20.png | Bin 0 -> 397 bytes PKHeX/Resources/img/ball/_ball21.png | Bin 0 -> 373 bytes PKHeX/Resources/img/ball/_ball22.png | Bin 0 -> 381 bytes PKHeX/Resources/img/ball/_ball23.png | Bin 0 -> 386 bytes PKHeX/Resources/img/ball/_ball24.png | Bin 0 -> 364 bytes PKHeX/Resources/img/ball/_ball25.png | Bin 0 -> 366 bytes PKHeX/Resources/img/ball/_ball26.png | Bin 0 -> 453 bytes PKHeX/Resources/img/ball/_ball3.png | Bin 0 -> 394 bytes PKHeX/Resources/img/ball/_ball4.png | Bin 0 -> 344 bytes PKHeX/Resources/img/ball/_ball5.png | Bin 0 -> 410 bytes PKHeX/Resources/img/ball/_ball6.png | Bin 0 -> 413 bytes PKHeX/Resources/img/ball/_ball7.png | Bin 0 -> 384 bytes PKHeX/Resources/img/ball/_ball8.png | Bin 0 -> 383 bytes PKHeX/Resources/img/ball/_ball9.png | Bin 0 -> 409 bytes 33 files changed, 1240 insertions(+), 11 deletions(-) create mode 100644 PKHeX/Resources/img/ball/_ball1.png create mode 100644 PKHeX/Resources/img/ball/_ball10.png create mode 100644 PKHeX/Resources/img/ball/_ball11.png create mode 100644 PKHeX/Resources/img/ball/_ball12.png create mode 100644 PKHeX/Resources/img/ball/_ball13.png create mode 100644 PKHeX/Resources/img/ball/_ball14.png create mode 100644 PKHeX/Resources/img/ball/_ball15.png create mode 100644 PKHeX/Resources/img/ball/_ball16.png create mode 100644 PKHeX/Resources/img/ball/_ball17.png create mode 100644 PKHeX/Resources/img/ball/_ball18.png create mode 100644 PKHeX/Resources/img/ball/_ball19.png create mode 100644 PKHeX/Resources/img/ball/_ball2.png create mode 100644 PKHeX/Resources/img/ball/_ball20.png create mode 100644 PKHeX/Resources/img/ball/_ball21.png create mode 100644 PKHeX/Resources/img/ball/_ball22.png create mode 100644 PKHeX/Resources/img/ball/_ball23.png create mode 100644 PKHeX/Resources/img/ball/_ball24.png create mode 100644 PKHeX/Resources/img/ball/_ball25.png create mode 100644 PKHeX/Resources/img/ball/_ball26.png create mode 100644 PKHeX/Resources/img/ball/_ball3.png create mode 100644 PKHeX/Resources/img/ball/_ball4.png create mode 100644 PKHeX/Resources/img/ball/_ball5.png create mode 100644 PKHeX/Resources/img/ball/_ball6.png create mode 100644 PKHeX/Resources/img/ball/_ball7.png create mode 100644 PKHeX/Resources/img/ball/_ball8.png create mode 100644 PKHeX/Resources/img/ball/_ball9.png diff --git a/PKHeX/MainWindow/Main.Designer.cs b/PKHeX/MainWindow/Main.Designer.cs index 1958a6d0d..1d46df9ac 100644 --- a/PKHeX/MainWindow/Main.Designer.cs +++ b/PKHeX/MainWindow/Main.Designer.cs @@ -127,7 +127,9 @@ public void InitializeComponent() this.Label_MetLocation = new System.Windows.Forms.Label(); this.CB_MetLocation = new System.Windows.Forms.ComboBox(); this.FLP_Ball = new System.Windows.Forms.FlowLayoutPanel(); + this.FLP_BallLeft = new System.Windows.Forms.FlowLayoutPanel(); this.Label_Ball = new System.Windows.Forms.Label(); + this.PB_Ball = new System.Windows.Forms.PictureBox(); this.CB_Ball = new System.Windows.Forms.ComboBox(); this.FLP_MetLevel = new System.Windows.Forms.FlowLayoutPanel(); this.Label_MetLevel = new System.Windows.Forms.Label(); @@ -479,6 +481,8 @@ public void InitializeComponent() this.FLP_OriginGame.SuspendLayout(); this.FLP_MetLocation.SuspendLayout(); this.FLP_Ball.SuspendLayout(); + this.FLP_BallLeft.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Ball)).BeginInit(); this.FLP_MetLevel.SuspendLayout(); this.FLP_MetDate.SuspendLayout(); this.FLP_Fateful.SuspendLayout(); @@ -1774,7 +1778,7 @@ public void InitializeComponent() // FLP_Ball // this.FLP_Ball.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.FLP_Ball.Controls.Add(this.Label_Ball); + this.FLP_Ball.Controls.Add(this.FLP_BallLeft); this.FLP_Ball.Controls.Add(this.CB_Ball); this.FLP_Ball.Location = new System.Drawing.Point(0, 42); this.FLP_Ball.Margin = new System.Windows.Forms.Padding(0); @@ -1782,16 +1786,40 @@ public void InitializeComponent() this.FLP_Ball.Size = new System.Drawing.Size(272, 21); this.FLP_Ball.TabIndex = 114; // + // FLP_BallLeft + // + this.FLP_BallLeft.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.FLP_BallLeft.Controls.Add(this.Label_Ball); + this.FLP_BallLeft.Controls.Add(this.PB_Ball); + this.FLP_BallLeft.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.FLP_BallLeft.Location = new System.Drawing.Point(0, 0); + this.FLP_BallLeft.Margin = new System.Windows.Forms.Padding(0); + this.FLP_BallLeft.Name = "FLP_BallLeft"; + this.FLP_BallLeft.Size = new System.Drawing.Size(110, 21); + this.FLP_BallLeft.TabIndex = 4; + // // Label_Ball // - this.Label_Ball.Location = new System.Drawing.Point(0, 0); + this.Label_Ball.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.Label_Ball.AutoSize = true; + this.Label_Ball.Location = new System.Drawing.Point(83, 0); this.Label_Ball.Margin = new System.Windows.Forms.Padding(0); this.Label_Ball.Name = "Label_Ball"; - this.Label_Ball.Size = new System.Drawing.Size(110, 21); + this.Label_Ball.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.Label_Ball.Size = new System.Drawing.Size(27, 19); this.Label_Ball.TabIndex = 2; this.Label_Ball.Text = "Ball:"; this.Label_Ball.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // PB_Ball + // + this.PB_Ball.Location = new System.Drawing.Point(60, 0); + this.PB_Ball.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.PB_Ball.Name = "PB_Ball"; + this.PB_Ball.Size = new System.Drawing.Size(20, 20); + this.PB_Ball.TabIndex = 3; + this.PB_Ball.TabStop = false; + // // CB_Ball // this.CB_Ball.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; @@ -1803,6 +1831,7 @@ public void InitializeComponent() this.CB_Ball.Size = new System.Drawing.Size(126, 21); this.CB_Ball.TabIndex = 3; this.CB_Ball.SelectedIndexChanged += new System.EventHandler(this.validateComboBox2); + this.CB_Ball.SelectedValueChanged += new System.EventHandler(this.updateBall); this.CB_Ball.KeyDown += new System.Windows.Forms.KeyEventHandler(this.removedropCB); this.CB_Ball.Validating += new System.ComponentModel.CancelEventHandler(this.validateComboBox); // @@ -5735,6 +5764,9 @@ public void InitializeComponent() this.FLP_OriginGame.ResumeLayout(false); this.FLP_MetLocation.ResumeLayout(false); this.FLP_Ball.ResumeLayout(false); + this.FLP_BallLeft.ResumeLayout(false); + this.FLP_BallLeft.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PB_Ball)).EndInit(); this.FLP_MetLevel.ResumeLayout(false); this.FLP_MetLevel.PerformLayout(); this.FLP_MetDate.ResumeLayout(false); @@ -6302,6 +6334,8 @@ public void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem Menu_Redo; private System.Windows.Forms.PictureBox PB_MarkAlola; private System.Windows.Forms.Button B_OpenPokeBeans; + private System.Windows.Forms.FlowLayoutPanel FLP_BallLeft; + private System.Windows.Forms.PictureBox PB_Ball; } } diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index 533721959..0be4d5ccf 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -1843,6 +1843,10 @@ private void clickMoves(object sender, EventArgs e) } // Prompted Updates of PKX Functions // private bool changingFields; + private void updateBall(object sender, EventArgs e) + { + PB_Ball.Image = PKX.getBallSprite(Util.getIndex(CB_Ball)); + } private void updateEXPLevel(object sender, EventArgs e) { if (changingFields || !fieldsInitialized) return; diff --git a/PKHeX/MainWindow/Main.resx b/PKHeX/MainWindow/Main.resx index 6fdef7db4..7496fe776 100644 --- a/PKHeX/MainWindow/Main.resx +++ b/PKHeX/MainWindow/Main.resx @@ -120,6 +120,99 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -155,12 +248,33 @@ True + + True + + + True + + + True + True True + + True + + + True + + + True + + + True + True @@ -170,6 +284,21 @@ True + + True + + + True + + + True + + + True + + + True + True @@ -188,12 +317,30 @@ True + + True + + + True + True True + + True + + + True + + + True + + + True + True @@ -212,9 +359,33 @@ True + + True + + + True + + + True + + + True + True + + True + + + True + + + True + + + True + True @@ -230,6 +401,15 @@ True + + True + + + True + + + True + True @@ -239,9 +419,27 @@ True + + True + + + True + True + + True + + + True + + + True + + + True + True @@ -257,12 +455,30 @@ True + + True + + + True + True True + + True + + + True + + + True + + + True + True @@ -275,6 +491,15 @@ True + + True + + + True + + + True + True @@ -284,10 +509,10 @@ True - + True - + True @@ -314,12 +539,6 @@ True - - True - - - True - True @@ -380,9 +599,60 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True + + True + + + True + + + True + + + True + True @@ -395,6 +665,9 @@ True + + True + True @@ -404,6 +677,18 @@ True + + True + + + True + + + True + + + True + True @@ -416,9 +701,30 @@ True + + True + + + True + + + True + True + + True + + + True + + + True + + + True + True @@ -431,6 +737,9 @@ True + + True + True @@ -440,6 +749,18 @@ True + + True + + + True + + + True + + + True + True @@ -452,6 +773,18 @@ True + + True + + + True + + + True + + + True + True @@ -464,9 +797,30 @@ True + + True + + + True + + + True + True + + True + + + True + + + True + + + True + True @@ -482,6 +836,18 @@ True + + True + + + True + + + True + + + True + True @@ -568,6 +934,30 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1 @@ -690,6 +1080,48 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -702,9 +1134,27 @@ True + + True + + + True + + + True + True + + True + + + True + + + True + iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -862,6 +1312,33 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -898,6 +1375,108 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -1003,6 +1582,42 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1116,6 +1731,24 @@ True + + True + + + True + + + True + + + True + + + True + + + True + iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1186,6 +1819,54 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -1225,12 +1906,18 @@ True + + True + True True + + True + True @@ -1240,6 +1927,36 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True @@ -1273,6 +1990,60 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True diff --git a/PKHeX/PKHeX.csproj b/PKHeX/PKHeX.csproj index 8c2a42b14..b1b48565a 100644 --- a/PKHeX/PKHeX.csproj +++ b/PKHeX/PKHeX.csproj @@ -3688,6 +3688,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +