Merge pull request #1742 from peppy/improve-screen-offset

Add special logic to song select to avoid obvious clipping when notifications are displayed
This commit is contained in:
Dan Balasescu
2017-12-26 18:01:28 +09:00
committed by GitHub
2 changed files with 37 additions and 15 deletions

View File

@ -75,7 +75,7 @@ namespace osu.Game.Screens.Select
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new Box Background = new Box
{ {
Colour = Color4.Black, Colour = Color4.Black,
Alpha = 0.8f, Alpha = 0.8f,
@ -167,6 +167,8 @@ namespace osu.Game.Screens.Select
private Bindable<bool> showConverted; private Bindable<bool> showConverted;
public readonly Box Background;
[BackgroundDependencyLoader(permitNulls: true)] [BackgroundDependencyLoader(permitNulls: true)]
private void load(OsuColour colours, OsuGame osu, OsuConfigManager config) private void load(OsuColour colours, OsuGame osu, OsuConfigManager config)
{ {

View File

@ -103,8 +103,24 @@ namespace osu.Game.Screens.Select
Right = left_area_padding * 2, Right = left_area_padding * 2,
} }
}, },
new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Width = 2, //avoid horizontal masking so the panels don't clip when screen stack is pushed.
Child = new Container
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Width = 0.5f,
Children = new Drawable[]
{
carousel = new BeatmapCarousel carousel = new BeatmapCarousel
{ {
Masking = false,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Size = new Vector2(carousel_width, 1), Size = new Vector2(carousel_width, 1),
Anchor = Anchor.CentreRight, Anchor = Anchor.CentreRight,
@ -117,8 +133,12 @@ namespace osu.Game.Screens.Select
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = filter_height, Height = filter_height,
FilterChanged = c => carousel.Filter(c), FilterChanged = c => carousel.Filter(c),
Background = { Width = 2 },
Exit = Exit, Exit = Exit,
}, },
}
},
},
beatmapInfoWedge = new BeatmapInfoWedge beatmapInfoWedge = new BeatmapInfoWedge
{ {
Alpha = 0, Alpha = 0,