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

@ -4,6 +4,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Users;
@ -30,21 +31,14 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
public float TextSize
{
set
{
if (text.TextSize == value) return;
text.TextSize = value;
}
get { return text.TextSize; }
get => text.Font.Size;
set => text.Font = OsuFont.GetFont(text.Font, size: value);
}
public ClickableUsername()
{
AutoSizeAxes = Axes.Both;
Child = text = new OsuSpriteText
{
Font = @"Exo2.0-BoldItalic",
};
Child = text = new OsuSpriteText { Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true) };
}
[BackgroundDependencyLoader(true)]

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = $"#{index + 1}",
Font = @"Exo2.0-RegularItalic",
Font = OsuFont.GetFont(italics: true),
Margin = new MarginPadding { Left = side_margin }
},
new DrawableFlag(score.User.Country)
@ -87,17 +87,16 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight,
Text = $@"{score.TotalScore:N0}",
Font = @"Venera",
Font = OsuFont.GetFont(Typeface.Venera, fixedWidth: true),
RelativePositionAxes = Axes.X,
X = 0.75f,
FixedWidth = true,
},
new OsuSpriteText
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight,
Text = $@"{score.Accuracy:P2}",
Font = @"Exo2.0-RegularItalic",
Font = OsuFont.GetFont(italics: true),
RelativePositionAxes = Axes.X,
X = 0.85f
},
@ -106,7 +105,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Text = $"{score.Statistics[HitResult.Great]}/{score.Statistics[HitResult.Good]}/{score.Statistics[HitResult.Meh]}",
Font = @"Exo2.0-RegularItalic",
Font = OsuFont.GetFont(italics: true),
Margin = new MarginPadding { Right = side_margin }
},
};

View File

@ -117,8 +117,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Anchor = Anchor.TopRight,
Origin = Anchor.BottomRight,
Text = "#1",
TextSize = 40,
Font = @"Exo2.0-BoldItalic",
Font = OsuFont.GetFont(size: 40, weight: FontWeight.Bold, italics: true),
Y = height / 4,
Margin = new MarginPadding { Right = margin }
},
@ -222,15 +221,10 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
headerText = new OsuSpriteText
{
TextSize = 14,
Text = header,
Font = @"Exo2.0-Bold",
Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold)
},
valueText = new OsuSpriteText
{
TextSize = 25,
Font = @"Exo2.0-RegularItalic",
}
valueText = new OsuSpriteText { Font = OsuFont.GetFont(size: 25, italics: true) }
};
}