Add u32 hex key -> enter to jump to key (ignoring named blocks)

This commit is contained in:
Kurt 2021-02-27 22:34:05 -08:00
parent c27697c919
commit 8145456ca8
2 changed files with 13 additions and 0 deletions

View file

@ -72,6 +72,7 @@
this.CB_Key.Size = new System.Drawing.Size(183, 22);
this.CB_Key.TabIndex = 0;
this.CB_Key.SelectedIndexChanged += new System.EventHandler(this.CB_Key_SelectedIndexChanged);
this.CB_Key.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CB_Key_KeyDown);
//
// L_Key
//

View file

@ -245,5 +245,17 @@ namespace PKHeX.WinForms
if (CurrentBlock.Type != SCTypeCode.Object && CurrentBlock.Type != SCTypeCode.Array)
L_Detail_R.Text = GetBlockSummary(CurrentBlock);
}
private void CB_Key_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Enter)
return;
var text = CB_Key.Text;
if (text.Length != 8)
return;
CB_Key.SelectedValue = (int)Util.GetHexValue(text);
}
}
}