Hex Editor - open poke dialog in a logical location, update the hex editor when Poke is clicked on the Poke pop up dialog
This commit is contained in:
parent
6da53b535b
commit
ebf7273cbe
|
@ -1458,7 +1458,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
var poke = new RamPoke
|
||||
{
|
||||
InitialLocation = GetAddressCoordinates(addresses[0])
|
||||
InitialLocation = PointToScreen(GetAddressCoordinates(addresses[0])),
|
||||
ParentTool = this
|
||||
};
|
||||
|
||||
var watches = addresses.Select(
|
||||
|
|
|
@ -20,6 +20,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
public IToolForm ParentTool { get; set; }
|
||||
|
||||
public void SetWatch(IEnumerable<Watch> watches)
|
||||
{
|
||||
_watchList = watches.ToList();
|
||||
|
@ -86,6 +88,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void Ok_Click(object sender, EventArgs e)
|
||||
{
|
||||
var success = _watchList.All(watch => watch.Poke(ValueBox.Text));
|
||||
if (ParentTool != null)
|
||||
{
|
||||
ParentTool.UpdateValues();
|
||||
}
|
||||
|
||||
OutputLabel.Text = success ? "Value successfully written."
|
||||
: "An error occured when writing Value.";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue