1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 23:22:55 +08:00

Move some styling inside BeatmapInfoWedge and fix initial transition happening too early.

This commit is contained in:
Dean Herbert 2016-11-26 17:31:35 +09:00
parent 5764bf8093
commit af18d25357
2 changed files with 19 additions and 14 deletions

View File

@ -16,10 +16,27 @@ namespace osu.Game.Screens.Select
{
class BeatmapInfoWedge : Container
{
private static readonly Vector2 wedged_container_shear = new Vector2(0.15f, 0);
private Container beatmapInfoContainer;
private BaseGame game;
public BeatmapInfoWedge()
{
Shear = wedged_container_shear;
Masking = true;
BorderColour = new Color4(221, 255, 255, 255);
BorderThickness = 2.5f;
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150),
Radius = 20,
Roundness = 15,
};
}
[BackgroundDependencyLoader]
private void load(BaseGame game)
{
@ -35,8 +52,6 @@ namespace osu.Game.Screens.Select
float newDepth = lastContainer?.Depth - 1 ?? 0;
FadeIn(250);
BeatmapSetInfo beatmapSetInfo = beatmap.BeatmapSetInfo;
BeatmapInfo beatmapInfo = beatmap.BeatmapInfo;
@ -126,6 +141,8 @@ namespace osu.Game.Screens.Select
}
}).Preload(game, delegate(Drawable d)
{
FadeIn(250);
lastContainer?.FadeOut(250);
lastContainer?.Expire();

View File

@ -38,7 +38,6 @@ namespace osu.Game.Screens.Select
private TrackManager trackManager;
private static readonly Vector2 wedged_container_size = new Vector2(0.5f, 225);
private static readonly Vector2 wedged_container_shear = new Vector2(0.15f, 0);
private static readonly Vector2 wedged_container_start_position = new Vector2(0, 50);
private BeatmapInfoWedge beatmapInfoWedge;
@ -105,18 +104,7 @@ namespace osu.Game.Screens.Select
Position = wedged_container_start_position,
Size = wedged_container_size,
RelativeSizeAxes = Axes.X,
Shear = wedged_container_shear,
Margin = new MarginPadding { Top = 20, Right = 20, },
Masking = true,
BorderColour = new Color4(221, 255, 255, 255),
BorderThickness = 2.5f,
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
Colour = new Color4(130, 204, 255, 150),
Radius = 20,
Roundness = 15,
},
},
new Container
{