mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 10:27:26 +09:00
Remove overlay when viewing leaderboard scores
Do not add the hold-to-retry hotkey overlay if the user has navigated to the results screen from the leaderboard and not from gameplay.
This commit is contained in:
parent
3ec9580ba8
commit
539f8ad6dd
@ -116,146 +116,147 @@ namespace osu.Game.Screens.Ranking
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChild = new AspectContainer
|
||||||
{
|
{
|
||||||
new AspectContainer
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Height = overscan,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
circleOuterBackground = new CircularContainer
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Height = overscan,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
circleOuterBackground = new CircularContainer
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
new Box
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
{
|
||||||
new Box
|
Alpha = 0.2f,
|
||||||
{
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0.2f,
|
Colour = Color4.Black,
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.Black,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
circleOuter = new CircularContainer
|
|
||||||
{
|
|
||||||
Size = new Vector2(circle_outer_scale),
|
|
||||||
EdgeEffect = new EdgeEffectParameters
|
|
||||||
{
|
|
||||||
Colour = Color4.Black.Opacity(0.4f),
|
|
||||||
Type = EdgeEffectType.Shadow,
|
|
||||||
Radius = 15,
|
|
||||||
},
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.White,
|
|
||||||
},
|
|
||||||
backgroundParallax = new ParallaxContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
ParallaxAmount = 0.01f,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Sprite
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Alpha = 0.2f,
|
|
||||||
Texture = Beatmap.Value.Background,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
FillMode = FillMode.Fill
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
modeChangeButtons = new ResultModeTabControl
|
|
||||||
{
|
|
||||||
Anchor = Anchor.BottomCentre,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
RelativeSizeAxes = Axes.X,
|
|
||||||
Height = 50,
|
|
||||||
Margin = new MarginPadding { Bottom = 110 },
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
Text = $"{Score.MaxCombo}x",
|
|
||||||
RelativePositionAxes = Axes.X,
|
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 40),
|
|
||||||
X = 0.1f,
|
|
||||||
Colour = colours.BlueDarker,
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "max combo",
|
|
||||||
Font = OsuFont.GetFont(size: 20),
|
|
||||||
RelativePositionAxes = Axes.X,
|
|
||||||
X = 0.1f,
|
|
||||||
Colour = colours.Gray6,
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.BottomCentre,
|
|
||||||
Text = $"{Score.Accuracy:P2}",
|
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 40),
|
|
||||||
RelativePositionAxes = Axes.X,
|
|
||||||
X = 0.9f,
|
|
||||||
Colour = colours.BlueDarker,
|
|
||||||
},
|
|
||||||
new OsuSpriteText
|
|
||||||
{
|
|
||||||
Anchor = Anchor.CentreLeft,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Text = "accuracy",
|
|
||||||
Font = OsuFont.GetFont(size: 20),
|
|
||||||
RelativePositionAxes = Axes.X,
|
|
||||||
X = 0.9f,
|
|
||||||
Colour = colours.Gray6,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
circleInner = new CircularContainer
|
|
||||||
{
|
|
||||||
Size = new Vector2(0.6f),
|
|
||||||
EdgeEffect = new EdgeEffectParameters
|
|
||||||
{
|
|
||||||
Colour = Color4.Black.Opacity(0.4f),
|
|
||||||
Type = EdgeEffectType.Shadow,
|
|
||||||
Radius = 15,
|
|
||||||
},
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Masking = true,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Colour = Color4.White,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
circleOuter = new CircularContainer
|
||||||
|
{
|
||||||
|
Size = new Vector2(circle_outer_scale),
|
||||||
|
EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Colour = Color4.Black.Opacity(0.4f),
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Radius = 15,
|
||||||
|
},
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.White,
|
||||||
|
},
|
||||||
|
backgroundParallax = new ParallaxContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
ParallaxAmount = 0.01f,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Sprite
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Alpha = 0.2f,
|
||||||
|
Texture = Beatmap.Value.Background,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
FillMode = FillMode.Fill
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modeChangeButtons = new ResultModeTabControl
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomCentre,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = 50,
|
||||||
|
Margin = new MarginPadding { Bottom = 110 },
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
Text = $"{Score.MaxCombo}x",
|
||||||
|
RelativePositionAxes = Axes.X,
|
||||||
|
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 40),
|
||||||
|
X = 0.1f,
|
||||||
|
Colour = colours.BlueDarker,
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Text = "max combo",
|
||||||
|
Font = OsuFont.GetFont(size: 20),
|
||||||
|
RelativePositionAxes = Axes.X,
|
||||||
|
X = 0.1f,
|
||||||
|
Colour = colours.Gray6,
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.BottomCentre,
|
||||||
|
Text = $"{Score.Accuracy:P2}",
|
||||||
|
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 40),
|
||||||
|
RelativePositionAxes = Axes.X,
|
||||||
|
X = 0.9f,
|
||||||
|
Colour = colours.BlueDarker,
|
||||||
|
},
|
||||||
|
new OsuSpriteText
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
Text = "accuracy",
|
||||||
|
Font = OsuFont.GetFont(size: 20),
|
||||||
|
RelativePositionAxes = Axes.X,
|
||||||
|
X = 0.9f,
|
||||||
|
Colour = colours.Gray6,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
circleInner = new CircularContainer
|
||||||
|
{
|
||||||
|
Size = new Vector2(0.6f),
|
||||||
|
EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Colour = Color4.Black.Opacity(0.4f),
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Radius = 15,
|
||||||
|
},
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Masking = true,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.White,
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
new HotkeyRetryOverlay
|
};
|
||||||
|
|
||||||
|
if (player != null)
|
||||||
|
{
|
||||||
|
AddInternal(new HotkeyRetryOverlay
|
||||||
{
|
{
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
@ -263,8 +264,8 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
player?.Restart();
|
player?.Restart();
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
var pages = CreateResultPages();
|
var pages = CreateResultPages();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user