mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 23:36:10 +08:00
Synchronise (roughly) backgrounds of all custom tooltips
This commit is contained in:
parent
3ca2c90684
commit
8eace12fe3
@ -30,6 +30,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
{
|
{
|
||||||
background = new Box
|
background = new Box
|
||||||
{
|
{
|
||||||
|
Alpha = 0.9f,
|
||||||
RelativeSizeAxes = Axes.Both
|
RelativeSizeAxes = Axes.Both
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
|
@ -21,24 +21,31 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
{
|
{
|
||||||
public class LeaderboardScoreTooltip : VisibilityContainer, ITooltip<ScoreInfo>
|
public class LeaderboardScoreTooltip : VisibilityContainer, ITooltip<ScoreInfo>
|
||||||
{
|
{
|
||||||
private readonly OsuSpriteText timestampLabel;
|
private OsuSpriteText timestampLabel = null!;
|
||||||
private readonly FillFlowContainer<HitResultCell> topScoreStatistics;
|
private FillFlowContainer<HitResultCell> topScoreStatistics = null!;
|
||||||
private readonly FillFlowContainer<HitResultCell> bottomScoreStatistics;
|
private FillFlowContainer<HitResultCell> bottomScoreStatistics = null!;
|
||||||
private readonly FillFlowContainer<ModCell> modStatistics;
|
private FillFlowContainer<ModCell> modStatistics = null!;
|
||||||
|
|
||||||
public LeaderboardScoreTooltip()
|
public LeaderboardScoreTooltip()
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
AutoSizeDuration = 200;
|
||||||
|
AutoSizeEasing = Easing.OutQuint;
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
CornerRadius = 5;
|
CornerRadius = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0.7f,
|
Alpha = 0.9f,
|
||||||
Colour = Colour4.Black,
|
Colour = colours.Gray3,
|
||||||
},
|
},
|
||||||
new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
@ -118,10 +125,10 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
foreach (var result in score.GetStatisticsForDisplay())
|
foreach (var result in score.GetStatisticsForDisplay())
|
||||||
{
|
{
|
||||||
(result.Result > HitResult.Perfect
|
if (result.Result > HitResult.Perfect)
|
||||||
? bottomScoreStatistics
|
bottomScoreStatistics.Add(new HitResultCell(result));
|
||||||
: topScoreStatistics
|
else
|
||||||
).Add(new HitResultCell(result));
|
topScoreStatistics.Add(new HitResultCell(result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +178,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Padding = new MarginPadding { Horizontal = 2f },
|
Padding = new MarginPadding(2),
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold),
|
Font = OsuFont.Torus.With(size: 12, weight: FontWeight.SemiBold),
|
||||||
|
Loading…
Reference in New Issue
Block a user