Hex Editor - Fix so Ctrl+G hotkey works
This commit is contained in:
parent
6905f69b6b
commit
4b021113fb
|
@ -173,18 +173,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void goToAddressToolStripMenuItem_Click(object sender, EventArgs e)
|
private void goToAddressToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InputPrompt i = new InputPrompt();
|
MemoryViewer.GoToSpecifiedAddress();
|
||||||
i.Text = "Go to Address";
|
|
||||||
i.SetMessage("Enter a hexadecimal value");
|
|
||||||
i.ShowDialog();
|
|
||||||
|
|
||||||
if (i.UserOK)
|
|
||||||
{
|
|
||||||
if (InputValidate.IsValidHexNumber(i.UserText))
|
|
||||||
{
|
|
||||||
GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GoToAddress(int address)
|
public void GoToAddress(int address)
|
||||||
|
|
|
@ -128,6 +128,8 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (!InputValidate.IsValidHexNumber(((char)e.KeyCode).ToString()))
|
if (!InputValidate.IsValidHexNumber(((char)e.KeyCode).ToString()))
|
||||||
{
|
{
|
||||||
|
if (e.Control && e.KeyCode == Keys.G)
|
||||||
|
GoToSpecifiedAddress();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -497,5 +499,23 @@ namespace BizHawk.MultiClient
|
||||||
ClearNibbles();
|
ClearNibbles();
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GoToSpecifiedAddress()
|
||||||
|
{
|
||||||
|
InputPrompt i = new InputPrompt();
|
||||||
|
i.Text = "Go to Address";
|
||||||
|
i.SetMessage("Enter a hexadecimal value");
|
||||||
|
Global.Sound.StopSound();
|
||||||
|
i.ShowDialog();
|
||||||
|
Global.Sound.StartSound();
|
||||||
|
|
||||||
|
if (i.UserOK)
|
||||||
|
{
|
||||||
|
if (InputValidate.IsValidHexNumber(i.UserText))
|
||||||
|
{
|
||||||
|
GoToAddress(int.Parse(i.UserText, NumberStyles.HexNumber));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue