mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Merge pull request #5244 from peppy/changelog-comments
Add messaging telling users how to leave changelog comments
This commit is contained in:
commit
b8d3db4d37
@ -24,6 +24,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(ChangelogListing),
|
typeof(ChangelogListing),
|
||||||
typeof(ChangelogSingleBuild),
|
typeof(ChangelogSingleBuild),
|
||||||
typeof(ChangelogBuild),
|
typeof(ChangelogBuild),
|
||||||
|
typeof(Comments),
|
||||||
};
|
};
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -33,6 +33,8 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
[JsonProperty("versions")]
|
[JsonProperty("versions")]
|
||||||
public VersionNavigation Versions { get; set; }
|
public VersionNavigation Versions { get; set; }
|
||||||
|
|
||||||
|
public string Url => $"https://osu.ppy.sh/home/changelog/{UpdateStream.Name}/{Version}";
|
||||||
|
|
||||||
public class VersionNavigation
|
public class VersionNavigation
|
||||||
{
|
{
|
||||||
[JsonProperty("next")]
|
[JsonProperty("next")]
|
||||||
|
@ -58,7 +58,11 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (build != null)
|
if (build != null)
|
||||||
Child = new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild };
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new ChangelogBuildWithNavigation(build) { SelectBuild = SelectBuild },
|
||||||
|
new Comments(build)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ChangelogBuildWithNavigation : ChangelogBuild
|
public class ChangelogBuildWithNavigation : ChangelogBuild
|
||||||
|
79
osu.Game/Overlays/Changelog/Comments.cs
Normal file
79
osu.Game/Overlays/Changelog/Comments.cs
Normal 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.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user