mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 08:03:12 +08:00
Added Author link in BeatmapSet Overlay
This commit is contained in:
parent
9f24cdb355
commit
eb977312ed
@ -13,6 +13,8 @@ using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Users;
|
||||
using osu.Game.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
@ -50,7 +52,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
fields.Children = new Drawable[]
|
||||
{
|
||||
new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(weight: FontWeight.Regular, italics: true)),
|
||||
new Field("mapped by", BeatmapSet.Metadata.Author, OsuFont.GetFont(weight: FontWeight.Regular, italics: true)),
|
||||
new Field("submitted", online.Submitted, OsuFont.GetFont(weight: FontWeight.Bold))
|
||||
{
|
||||
Margin = new MarginPadding { Top = 5 },
|
||||
@ -146,6 +148,25 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public Field(string first, User second, FontUsage secondFont)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Direction = FillDirection.Horizontal;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
new LinkFlowContainer(s =>
|
||||
{
|
||||
s.Font = OsuFont.GetFont(size: 11);
|
||||
}).With(d =>
|
||||
{
|
||||
d.AutoSizeAxes = Axes.Both;
|
||||
d.AddText($"{first} ");
|
||||
d.AddUserLink(second, s => s.Font = secondFont.With(size: 11));
|
||||
}),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user