Add ToString() overrides on many classes to make debugging easier

This commit is contained in:
Dean Herbert
2017-12-16 16:14:01 +09:00
parent a8a2c233a0
commit 49ce42d90c
5 changed files with 12 additions and 0 deletions

View File

@ -228,9 +228,13 @@ namespace osu.Game.Tests.Visual
checkVisibleItemCount(false, set_count + 1);
setSelected(set_count + 1, 1);
AddStep("Remove set", () => carousel.RemoveBeatmapSet(createTestBeatmapSet(set_count + 1)));
checkVisibleItemCount(false, set_count);
checkSelected(set_count, 1);
}
/// <summary>

View File

@ -118,6 +118,8 @@ namespace osu.Game.Beatmaps
[JsonProperty("difficulty_rating")]
public double StarDifficulty { get; set; }
public override string ToString() => $"{Metadata} [{Version}]";
public bool Equals(BeatmapInfo other)
{
if (ID == 0 || other?.ID == 0)

View File

@ -57,6 +57,8 @@ namespace osu.Game.Beatmaps
public string AudioFile { get; set; }
public string BackgroundFile { get; set; }
public override string ToString() => $"{Artist} - {Title} ({Author})";
public string[] SearchableTerms => new[]
{
Author?.Username,

View File

@ -33,6 +33,8 @@ namespace osu.Game.Beatmaps
public List<BeatmapSetFileInfo> Files { get; set; }
public override string ToString() => Metadata.ToString();
public bool Protected { get; set; }
}
}

View File

@ -136,5 +136,7 @@ namespace osu.Game.Users
[JsonProperty(@"rankHistory")]
public RankHistoryData RankHistory;
public override string ToString() => Username;
}
}