Ram Poke - on load and signed type change, display the value in the value box accordingly
This commit is contained in:
parent
24649e49e7
commit
3e3748f87b
|
@ -12,8 +12,6 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
public partial class RamPoke : Form
|
public partial class RamPoke : Form
|
||||||
{
|
{
|
||||||
//TODO:
|
|
||||||
//If signed/unsigned/hex radios selected, auto-change the value box
|
|
||||||
public Watch watch = new Watch();
|
public Watch watch = new Watch();
|
||||||
public MemoryDomain domain = Global.Emulator.MainMemory;
|
public MemoryDomain domain = Global.Emulator.MainMemory;
|
||||||
public Point location = new Point();
|
public Point location = new Point();
|
||||||
|
@ -65,6 +63,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
UpdateTitleText();
|
UpdateTitleText();
|
||||||
SetDomainSelection();
|
SetDomainSelection();
|
||||||
|
FormatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetValueBox()
|
private void SetValueBox()
|
||||||
|
@ -347,18 +346,24 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
ValueHexLabel.Text = "0x";
|
ValueHexLabel.Text = "0x";
|
||||||
ValueBox.MaxLength = GetValueNumDigits();
|
ValueBox.MaxLength = GetValueNumDigits();
|
||||||
|
watch.Signed = Watch.DISPTYPE.HEX;
|
||||||
|
FormatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnsignedRadio_Click(object sender, EventArgs e)
|
private void UnsignedRadio_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ValueHexLabel.Text = "";
|
ValueHexLabel.Text = "";
|
||||||
ValueBox.MaxLength = GetValueNumDigits();
|
ValueBox.MaxLength = GetValueNumDigits();
|
||||||
|
watch.Signed = Watch.DISPTYPE.UNSIGNED;
|
||||||
|
FormatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SignedRadio_Click(object sender, EventArgs e)
|
private void SignedRadio_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ValueHexLabel.Text = "";
|
ValueHexLabel.Text = "";
|
||||||
ValueBox.MaxLength = GetValueNumDigits();
|
ValueBox.MaxLength = GetValueNumDigits();
|
||||||
|
watch.Signed = Watch.DISPTYPE.SIGNED;
|
||||||
|
FormatValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int GetValueNumDigits()
|
private int GetValueNumDigits()
|
||||||
|
@ -431,5 +436,10 @@ namespace BizHawk.MultiClient
|
||||||
DomainComboBox.SelectedIndex = x;
|
DomainComboBox.SelectedIndex = x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FormatValue()
|
||||||
|
{
|
||||||
|
ValueBox.Text = watch.ValueString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue