mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:06:08 +08:00
Correct masking layers on song select.
This commit is contained in:
parent
050fa7fbe8
commit
d230c3f9ac
@ -27,6 +27,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
@ -48,7 +49,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private AudioSample sampleChangeDifficulty;
|
private AudioSample sampleChangeDifficulty;
|
||||||
private AudioSample sampleChangeBeatmap;
|
private AudioSample sampleChangeBeatmap;
|
||||||
|
|
||||||
private List<BeatmapGroup> beatmapGroups;
|
private List<BeatmapGroup> beatmapGroups;
|
||||||
|
|
||||||
private Footer footer;
|
private Footer footer;
|
||||||
@ -84,20 +85,25 @@ namespace osu.Game.Screens.Select
|
|||||||
OsuGame osuGame, OsuColour colours)
|
OsuGame osuGame, OsuColour colours)
|
||||||
{
|
{
|
||||||
const float carousel_width = 640;
|
const float carousel_width = 640;
|
||||||
|
const float filter_height = 100;
|
||||||
|
|
||||||
beatmapGroups = new List<BeatmapGroup>();
|
beatmapGroups = new List<BeatmapGroup>();
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ParallaxContainer
|
new ParallaxContainer
|
||||||
{
|
{
|
||||||
Masking = true,
|
Padding = new MarginPadding { Top = filter_height },
|
||||||
ParallaxAmount = 0.005f,
|
ParallaxAmount = 0.005f,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new []
|
Children = new[]
|
||||||
{
|
{
|
||||||
new WedgeBackground
|
new WedgeBackground
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = carousel_width * 0.76f },
|
Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Right = carousel_width * 0.76f
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -111,7 +117,7 @@ namespace osu.Game.Screens.Select
|
|||||||
filter = new FilterControl
|
filter = new FilterControl
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = 100,
|
Height = filter_height,
|
||||||
FilterChanged = filterChanged,
|
FilterChanged = filterChanged,
|
||||||
Exit = Exit,
|
Exit = Exit,
|
||||||
},
|
},
|
||||||
@ -120,7 +126,11 @@ namespace osu.Game.Screens.Select
|
|||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Size = wedged_container_size,
|
Size = wedged_container_size,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Margin = new MarginPadding { Top = 20, Right = 20, },
|
Margin = new MarginPadding
|
||||||
|
{
|
||||||
|
Top = 20,
|
||||||
|
Right = 20,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
footer = new Footer()
|
footer = new Footer()
|
||||||
{
|
{
|
||||||
@ -204,7 +214,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
beatmapInfoWedge.MoveToX(-50);
|
beatmapInfoWedge.MoveToX(-50);
|
||||||
beatmapInfoWedge.MoveToX(0, 800, EasingTypes.OutQuint);
|
beatmapInfoWedge.MoveToX(0, 800, EasingTypes.OutQuint);
|
||||||
|
|
||||||
filter.Activate();
|
filter.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +238,7 @@ namespace osu.Game.Screens.Select
|
|||||||
Content.ScaleTo(1.1f, 250, EasingTypes.InSine);
|
Content.ScaleTo(1.1f, 250, EasingTypes.InSine);
|
||||||
|
|
||||||
Content.FadeOut(250);
|
Content.FadeOut(250);
|
||||||
|
|
||||||
filter.Deactivate();
|
filter.Deactivate();
|
||||||
base.OnSuspending(next);
|
base.OnSuspending(next);
|
||||||
}
|
}
|
||||||
@ -240,7 +250,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
Content.FadeOut(100);
|
Content.FadeOut(100);
|
||||||
|
|
||||||
filter.Deactivate();
|
filter.Deactivate();
|
||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user