Adjust sprite texts in-line with framework changes

This commit is contained in:
smoogipoo
2019-02-12 13:04:46 +09:00
parent e174fa2d3e
commit a2aa3ec5cb
140 changed files with 424 additions and 514 deletions

View File

@ -11,6 +11,8 @@ using osuTK;
using osuTK.Graphics;
using osu.Game.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
namespace osu.Game.Overlays.BeatmapSet
{
@ -47,8 +49,8 @@ namespace osu.Game.Overlays.BeatmapSet
fields.Children = new Drawable[]
{
new Field("mapped by", BeatmapSet.Metadata.Author.Username, @"Exo2.0-RegularItalic"),
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold")
new Field("mapped by", BeatmapSet.Metadata.Author.Username, OsuFont.GetFont(italics: true)),
new Field("submitted on", online.Submitted.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold))
{
Margin = new MarginPadding { Top = 5 },
},
@ -56,11 +58,11 @@ namespace osu.Game.Overlays.BeatmapSet
if (online.Ranked.HasValue)
{
fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold"));
fields.Add(new Field("ranked on", online.Ranked.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
}
else if (online.LastUpdated.HasValue)
{
fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), @"Exo2.0-Bold"));
fields.Add(new Field("last updated on", online.LastUpdated.Value.ToString(@"MMMM d, yyyy"), OsuFont.GetFont(weight: FontWeight.Bold)));
}
}
@ -105,7 +107,7 @@ namespace osu.Game.Overlays.BeatmapSet
private class Field : FillFlowContainer
{
public Field(string first, string second, string secondFont)
public Field(string first, string second, FontUsage secondFont)
{
AutoSizeAxes = Axes.Both;
Direction = FillDirection.Horizontal;
@ -115,13 +117,12 @@ namespace osu.Game.Overlays.BeatmapSet
new OsuSpriteText
{
Text = $"{first} ",
TextSize = 13,
Font = OsuFont.GetFont(size: 13)
},
new OsuSpriteText
{
Text = second,
TextSize = 13,
Font = secondFont,
Font = OsuFont.GetFont(secondFont, size: 13)
},
};
}