Split out ChangelogContent into two classes

This commit is contained in:
Dean Herbert
2019-05-17 17:15:51 +09:00
parent 876f108e0a
commit dd2d58d4f7
4 changed files with 118 additions and 79 deletions

View File

@ -0,0 +1,30 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Overlays.Changelog
{
public class ChangelogBuild : ChangelogContent
{
private readonly APIChangelogBuild changelogBuild;
public ChangelogBuild(APIChangelogBuild changelogBuild)
{
this.changelogBuild = changelogBuild;
}
[BackgroundDependencyLoader]
private void load()
{
var changelogContentGroup = new ChangelogContentGroup(changelogBuild);
changelogContentGroup.GenerateText(changelogBuild.ChangelogEntries);
changelogContentGroup.UpdateChevronTooltips(changelogBuild.Versions.Previous?.DisplayVersion,
changelogBuild.Versions.Next?.DisplayVersion);
changelogContentGroup.BuildSelected += SelectBuild;
Add(changelogContentGroup);
}
}
}