From 0a1fc199ba2734fb09240e00554e0a535c4219eb Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sat, 10 Sep 2016 17:14:25 -0700 Subject: [PATCH] Remove DVs label, readonly->enable IV We're gonna call them IVs for gen1/2 because this is {CURRENT YEAR}. Too much of a hassle to have multiple controls hidden just for generation specific nomenclature differences. Change the Readonly for HP & SpD to Enabled (and flip bool states); mask now appears to enforce non-centering, no need to pad with 0 to fake that it's centered. Closes #255, 8 bits down. --- PKHeX/MainWindow/Main.Designer.cs | 53 +- PKHeX/MainWindow/Main.cs | 13 +- PKHeX/MainWindow/Main.resx | 734 +--------------------------- PKHeX/Resources/text/en/lang_en.txt | 1 - 4 files changed, 20 insertions(+), 781 deletions(-) diff --git a/PKHeX/MainWindow/Main.Designer.cs b/PKHeX/MainWindow/Main.Designer.cs index ccd735cad..b3436b74b 100644 --- a/PKHeX/MainWindow/Main.Designer.cs +++ b/PKHeX/MainWindow/Main.Designer.cs @@ -157,9 +157,6 @@ public void InitializeComponent() this.FLP_HackedStats = new System.Windows.Forms.FlowLayoutPanel(); this.CHK_HackedStats = new System.Windows.Forms.CheckBox(); this.FLP_StatsHeaderRight = new System.Windows.Forms.FlowLayoutPanel(); - this.FLP_IVs = new System.Windows.Forms.FlowLayoutPanel(); - this.Label_IVs = new System.Windows.Forms.Label(); - this.Label_DVs = new System.Windows.Forms.Label(); this.Label_EVs = new System.Windows.Forms.Label(); this.Label_Stats = new System.Windows.Forms.Label(); this.FLP_HP = new System.Windows.Forms.FlowLayoutPanel(); @@ -429,6 +426,7 @@ public void InitializeComponent() this.mnuLSave = new System.Windows.Forms.ToolStripMenuItem(); this.PB_Legal = new System.Windows.Forms.PictureBox(); this.L_UpdateAvailable = new System.Windows.Forms.LinkLabel(); + this.Label_IVs = new System.Windows.Forms.Label(); this.tabMain.SuspendLayout(); this.Tab_Main.SuspendLayout(); this.FLP_Main.SuspendLayout(); @@ -475,7 +473,6 @@ public void InitializeComponent() this.FLP_StatHeader.SuspendLayout(); this.FLP_HackedStats.SuspendLayout(); this.FLP_StatsHeaderRight.SuspendLayout(); - this.FLP_IVs.SuspendLayout(); this.FLP_HP.SuspendLayout(); this.FLP_HPRight.SuspendLayout(); this.FLP_Atk.SuspendLayout(); @@ -2082,7 +2079,7 @@ public void InitializeComponent() // FLP_StatsHeaderRight // this.FLP_StatsHeaderRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.FLP_StatsHeaderRight.Controls.Add(this.FLP_IVs); + this.FLP_StatsHeaderRight.Controls.Add(this.Label_IVs); this.FLP_StatsHeaderRight.Controls.Add(this.Label_EVs); this.FLP_StatsHeaderRight.Controls.Add(this.Label_Stats); this.FLP_StatsHeaderRight.Location = new System.Drawing.Point(107, 0); @@ -2091,37 +2088,6 @@ public void InitializeComponent() this.FLP_StatsHeaderRight.Size = new System.Drawing.Size(162, 21); this.FLP_StatsHeaderRight.TabIndex = 123; // - // FLP_IVs - // - this.FLP_IVs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.FLP_IVs.Controls.Add(this.Label_IVs); - this.FLP_IVs.Controls.Add(this.Label_DVs); - this.FLP_IVs.Location = new System.Drawing.Point(0, 0); - this.FLP_IVs.Margin = new System.Windows.Forms.Padding(0); - this.FLP_IVs.Name = "FLP_IVs"; - this.FLP_IVs.Size = new System.Drawing.Size(30, 21); - this.FLP_IVs.TabIndex = 124; - // - // Label_IVs - // - this.Label_IVs.Location = new System.Drawing.Point(0, 0); - this.Label_IVs.Margin = new System.Windows.Forms.Padding(0); - this.Label_IVs.Name = "Label_IVs"; - this.Label_IVs.Size = new System.Drawing.Size(30, 21); - this.Label_IVs.TabIndex = 26; - this.Label_IVs.Text = "IVs"; - this.Label_IVs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label_DVs - // - this.Label_DVs.Location = new System.Drawing.Point(0, 21); - this.Label_DVs.Margin = new System.Windows.Forms.Padding(0); - this.Label_DVs.Name = "Label_DVs"; - this.Label_DVs.Size = new System.Drawing.Size(30, 21); - this.Label_DVs.TabIndex = 26; - this.Label_DVs.Text = "DVs"; - this.Label_DVs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // Label_EVs // this.Label_EVs.Location = new System.Drawing.Point(30, 0); @@ -5500,6 +5466,16 @@ public void InitializeComponent() this.L_UpdateAvailable.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.L_UpdateAvailable.Visible = false; // + // Label_IVs + // + this.Label_IVs.Location = new System.Drawing.Point(0, 0); + this.Label_IVs.Margin = new System.Windows.Forms.Padding(0); + this.Label_IVs.Name = "Label_IVs"; + this.Label_IVs.Size = new System.Drawing.Size(30, 21); + this.Label_IVs.TabIndex = 29; + this.Label_IVs.Text = "IVs"; + this.Label_IVs.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // Main // this.AllowDrop = true; @@ -5583,7 +5559,6 @@ public void InitializeComponent() this.FLP_HackedStats.ResumeLayout(false); this.FLP_HackedStats.PerformLayout(); this.FLP_StatsHeaderRight.ResumeLayout(false); - this.FLP_IVs.ResumeLayout(false); this.FLP_HP.ResumeLayout(false); this.FLP_HPRight.ResumeLayout(false); this.FLP_HPRight.PerformLayout(); @@ -5781,7 +5756,6 @@ public void InitializeComponent() private System.Windows.Forms.Label Label_HiddenPowerPrefix; private System.Windows.Forms.Label Label_Stats; private System.Windows.Forms.Label Label_EVs; - private System.Windows.Forms.Label Label_IVs; private System.Windows.Forms.Label Label_Total; private System.Windows.Forms.Label Label_SPE; private System.Windows.Forms.Label Label_SPD; @@ -6122,8 +6096,7 @@ public void InitializeComponent() private System.Windows.Forms.MaskedTextBox TB_Smart; private System.Windows.Forms.MaskedTextBox TB_Tough; private System.Windows.Forms.MaskedTextBox TB_Sheen; - private System.Windows.Forms.FlowLayoutPanel FLP_IVs; - private System.Windows.Forms.Label Label_DVs; + private System.Windows.Forms.Label Label_IVs; } } diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index 0f76d5c2a..a8c11af23 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -898,7 +898,6 @@ private void loadSAV(SaveFile sav, string path) BTN_Ribbons.Visible = SAV.Generation >= 3; CB_HPType.Enabled = CB_Form.Enabled = SAV.Generation >= 3; BTN_RerollPID.Visible = Label_PID.Visible = TB_PID.Visible = Label_SID.Visible = TB_SID.Visible = SAV.Generation >= 3; - Label_IVs.Visible = SAV.Generation >= 3; // DVs appears instead FLP_FriendshipForm.Visible = SAV.Generation >= 2; FLP_HeldItem.Visible = SAV.Generation >= 2; @@ -933,7 +932,7 @@ private void loadSAV(SaveFile sav, string path) FLP_SpD.Visible = false; Label_SPA.Visible = false; Label_SPC.Visible = true; - TB_HPIV.ReadOnly = true; + TB_HPIV.Enabled = false; MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV }; foreach (var ctrl in evControls) { @@ -946,8 +945,8 @@ private void loadSAV(SaveFile sav, string path) FLP_SpD.Visible = true; Label_SPA.Visible = true; Label_SPC.Visible = false; - TB_SPDEV.ReadOnly = TB_SPDIV.ReadOnly = true; - TB_HPIV.ReadOnly = true; + TB_SPDEV.Enabled = TB_SPDIV.Enabled = false; + TB_HPIV.Enabled = false; MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV }; foreach (var ctrl in evControls) { @@ -960,8 +959,8 @@ private void loadSAV(SaveFile sav, string path) FLP_SpD.Visible = true; Label_SPA.Visible = true; Label_SPC.Visible = false; - TB_SPDEV.ReadOnly = TB_SPDIV.ReadOnly = false; - TB_HPIV.ReadOnly = false; + TB_SPDEV.Enabled = TB_SPDIV.Enabled = true; + TB_HPIV.Enabled = true; MaskedTextBox[] evControls = { TB_SPAEV, TB_HPEV, TB_ATKEV, TB_DEFEV, TB_SPEEV, TB_SPDEV }; foreach (var ctrl in evControls) { @@ -1789,7 +1788,7 @@ private void updateIVs(object sender, EventArgs e) if (SAV.Generation < 3) { - TB_HPIV.Text = pkm.IV_HP.ToString("00"); + TB_HPIV.Text = pkm.IV_HP.ToString(); TB_SPDIV.Text = TB_SPAIV.Text; if (SAV.Generation == 2) { diff --git a/PKHeX/MainWindow/Main.resx b/PKHeX/MainWindow/Main.resx index e5c0098ac..83c30b379 100644 --- a/PKHeX/MainWindow/Main.resx +++ b/PKHeX/MainWindow/Main.resx @@ -129,15 +129,6 @@ True - - True - - - True - - - True - @@ -164,33 +155,12 @@ True - - True - - - True - - - True - True True - - True - - - True - - - True - - - True - True @@ -200,21 +170,6 @@ True - - True - - - True - - - True - - - True - - - True - True @@ -233,30 +188,12 @@ True - - True - - - True - True True - - True - - - True - - - True - - - True - True @@ -275,33 +212,9 @@ True - - True - - - True - - - True - - - True - True - - True - - - True - - - True - - - True - True @@ -317,15 +230,6 @@ True - - True - - - True - - - True - True @@ -335,27 +239,9 @@ True - - True - - - True - True - - True - - - True - - - True - - - True - True @@ -371,18 +257,6 @@ True - - True - - - True - - - True - - - True - True @@ -395,18 +269,6 @@ True - - True - - - True - - - True - - - True - True @@ -425,36 +287,12 @@ True - - True - - - True - - - True - - - True - True True - - True - - - True - - - True - - - True - True @@ -467,18 +305,6 @@ True - - True - - - True - - - True - - - True - True @@ -491,15 +317,6 @@ True - - True - - - True - - - True - True @@ -509,57 +326,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -602,10 +368,7 @@ True - - True - - + True @@ -614,30 +377,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -650,30 +389,9 @@ True - - True - - - True - - - True - True - - True - - - True - - - True - - - True - True @@ -686,9 +404,6 @@ True - - True - True @@ -698,18 +413,6 @@ True - - True - - - True - - - True - - - True - True @@ -722,30 +425,9 @@ True - - True - - - True - - - True - True - - True - - - True - - - True - - - True - True @@ -758,18 +440,6 @@ True - - True - - - True - - - True - - - True - True @@ -782,18 +452,6 @@ True - - True - - - True - - - True - - - True - True @@ -809,18 +467,6 @@ True - - True - - - True - - - True - - - True - True @@ -836,24 +482,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1 @@ -925,30 +553,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAeZJREFUOE+1 @@ -1071,57 +675,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1134,27 +687,9 @@ True - - True - - - True - - - True - True - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1312,33 +847,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1375,108 +883,6 @@ 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 @@ -1582,42 +988,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1731,24 +1101,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAG8AAACgCAYAAAACezIBAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -1819,54 +1171,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True @@ -1906,18 +1210,12 @@ True - - True - True True - - True - True @@ -1927,36 +1225,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - True diff --git a/PKHeX/Resources/text/en/lang_en.txt b/PKHeX/Resources/text/en/lang_en.txt index 633fe5432..2da4c4a78 100644 --- a/PKHeX/Resources/text/en/lang_en.txt +++ b/PKHeX/Resources/text/en/lang_en.txt @@ -96,7 +96,6 @@ Label_EggDate = Date: Tab_Stats = Stats CHK_HackedStats = Hacked Stats Label_IVs = IVs -Label_DVs = DVs Label_EVs = EVs Label_Stats = Stats Label_HP = HP: