reimplement strings for OSD watches

also fixed saving separators
This commit is contained in:
Connor Olding 2015-12-23 17:18:39 -08:00
parent 41ba4b6927
commit f0c939d87c
3 changed files with 9 additions and 4 deletions

View File

@ -75,7 +75,7 @@ namespace BizHawk.Client.Common
get { return string.Empty; }
}
public override string ToString()
public override string ToDisplayString()
{
return "----";
}

View File

@ -558,7 +558,7 @@ namespace BizHawk.Client.Common
public override string ToString()
{
return string.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}"
, Address.ToHexString((Domain.Size - 1).NumHexDigits())
, Domain == null && Address == 0 ? "0" : Address.ToHexString((Domain.Size - 1).NumHexDigits())
, SizeAsChar
, TypeAsChar
, Convert.ToInt32(BigEndian)
@ -567,6 +567,11 @@ namespace BizHawk.Client.Common
);
}
public virtual string ToDisplayString()
{
return Notes + ": " + ValueString;
}
#endregion
#region Properties

View File

@ -254,7 +254,7 @@ namespace BizHawk.Client.EmuHawk
{
var frozen = !_watches[i].IsSeparator && Global.CheatList.IsActive(_watches[i].Domain, _watches[i].Address);
GlobalWin.OSD.AddGUIText(
_watches[i].ToString(),
_watches[i].ToDisplayString(),
Global.Config.DispRamWatchx,
Global.Config.DispRamWatchy + (i * 14),
Color.Black,
@ -324,7 +324,7 @@ namespace BizHawk.Client.EmuHawk
{
var frozen = !_watches[i].IsSeparator && Global.CheatList.IsActive(_watches[i].Domain, _watches[i].Address);
GlobalWin.OSD.AddGUIText(
_watches[i].ToString(),
_watches[i].ToDisplayString(),
Global.Config.DispRamWatchx,
Global.Config.DispRamWatchy + (i * 14),
Color.Black,