Skip to content

Commit

Permalink
cap entry of Yellow pikachu friendship
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsch committed Jun 11, 2017
1 parent 21ab029 commit 5117f3a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
47 changes: 24 additions & 23 deletions PKHeX.WinForms/Subforms/Save Editors/SAV_SimpleTrainer.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions PKHeX.WinForms/Subforms/Save Editors/SAV_SimpleTrainer.cs
Expand Up @@ -162,6 +162,12 @@ private void changeFFFF(object sender, EventArgs e)
if (box.Text == "") box.Text = "0";
if (Util.ToInt32(box.Text) > 65535) box.Text = "65535";
}
private void change255(object sender, EventArgs e)
{
MaskedTextBox box = sender as MaskedTextBox;
if (box.Text == "") box.Text = "0";
if (Util.ToInt32(box.Text) > byte.MaxValue) box.Text = "255";
}

private void B_Save_Click(object sender, EventArgs e)
{
Expand Down

2 comments on commit 5117f3a

@evandixon
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use a NumericUpDown instead? You can set a custom minimum and maximum, and you don't have to deal with string conversion.

@kwsch
Copy link
Owner Author

@kwsch kwsch commented on 5117f3a Jun 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the wasted space for the up/down arrows.
It's the same implementation of the pkm editor and other number entries :)

Please sign in to comment.