1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Add messaging telling users how to leave changelog comments

This commit is contained in:
Dean Herbert 2019-07-04 15:47:06 +09:00
parent f41c89c3be
commit 4885f0f0c7
4 changed files with 87 additions and 1 deletions

View File

@ -24,6 +24,7 @@ namespace osu.Game.Tests.Visual.Online
typeof(ChangelogListing),
typeof(ChangelogSingleBuild),
typeof(ChangelogBuild),
typeof(Comments),
};
protected override void LoadComplete()

View File

@ -33,6 +33,8 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("versions")]
public VersionNavigation Versions { get; set; }
public object Url => $"https://osu.ppy.sh/home/changelog/{UpdateStream.Name}/{Version}";
public class VersionNavigation
{
[JsonProperty("next")]

View File

@ -58,7 +58,11 @@ namespace osu.Game.Overlays.Changelog
}
if (build != null)
Child = new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild };
Children = new Drawable[]
{
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
new Comments(build)
};
}
public class ChangelogBuildWithNavigation : ChangelogBuild

View File

@ -0,0 +1,79 @@
// 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.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API.Requests.Responses;
using osuTK.Graphics;
namespace osu.Game.Overlays.Changelog
{
public class Comments : CompositeDrawable
{
private readonly APIChangelogBuild build;
public Comments(APIChangelogBuild build)
{
this.build = build;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding
{
Horizontal = 50,
Vertical = 20,
};
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
LinkFlowContainer text;
InternalChildren = new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = colours.GreyVioletDarker
},
},
text = new LinkFlowContainer(t =>
{
t.Colour = colours.PinkLighter;
t.Font = OsuFont.Default.With(size: 14);
})
{
Padding = new MarginPadding(20),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
}
};
text.AddParagraph("Got feedback?", t =>
{
t.Colour = Color4.White;
t.Font = OsuFont.Default.With(italics: true, size: 20);
t.Padding = new MarginPadding { Bottom = 20 };
});
text.AddParagraph("We would love to hear what you think of this update! ");
text.AddIcon(FontAwesome.Regular.GrinHearts);
text.AddParagraph("Please visit the ");
text.AddLink("web version", $"{build.Url}#comments");
text.AddText(" of this changelog to leave any comments.");
}
}
}