Add scalar randomizer shortcut

Okay I'll be nice, fudge your values this way.
This commit is contained in:
Kurt
2021-11-24 19:32:12 -08:00
parent 203b764829
commit cce0111a9d
2 changed files with 9 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ private void InitializeComponent()
0,
0});
this.NUD_HeightScalar.ValueChanged += new System.EventHandler(this.NUD_HeightScalar_ValueChanged);
this.NUD_HeightScalar.Click += new System.EventHandler(this.ClickScalarEntry);
//
// TB_HeightAbs
//
@@ -191,6 +192,7 @@ private void InitializeComponent()
0,
0});
this.NUD_WeightScalar.ValueChanged += new System.EventHandler(this.NUD_WeightScalar_ValueChanged);
this.NUD_WeightScalar.Click += new System.EventHandler(this.ClickScalarEntry);
//
// TB_WeightAbs
//

View File

@@ -124,5 +124,12 @@ public void ToggleVisibility(PKM pk)
var pb7 = pk is PB7;
FLP_CP.Visible = L_CP.Visible = TB_HeightAbs.Visible = TB_WeightAbs.Visible = pb7;
}
private void ClickScalarEntry(object sender, EventArgs e)
{
if (sender is not NumericUpDown nud || ModifierKeys != Keys.Control)
return;
nud.Value = PokeSizeUtil.GetRandomScalar();
}
}
}