mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Adjust sprite texts in-line with framework changes
This commit is contained in:
@ -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)]
|
||||
|
@ -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 }
|
||||
},
|
||||
};
|
||||
|
@ -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) }
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user