1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

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
commit b7c2461a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 15 deletions

View File

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

View File

@ -103,21 +103,41 @@ namespace osu.Game.Screens.Select
Right = left_area_padding * 2,
}
},
carousel = new BeatmapCarousel
new Container
{
RelativeSizeAxes = Axes.Y,
Size = new Vector2(carousel_width, 1),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
SelectionChanged = carouselSelectionChanged,
BeatmapSetsChanged = carouselBeatmapsLoaded,
},
FilterControl = new FilterControl
{
RelativeSizeAxes = Axes.X,
Height = filter_height,
FilterChanged = c => carousel.Filter(c),
Exit = Exit,
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
{
Masking = false,
RelativeSizeAxes = Axes.Y,
Size = new Vector2(carousel_width, 1),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
SelectionChanged = carouselSelectionChanged,
BeatmapSetsChanged = carouselBeatmapsLoaded,
},
FilterControl = new FilterControl
{
RelativeSizeAxes = Axes.X,
Height = filter_height,
FilterChanged = c => carousel.Filter(c),
Background = { Width = 2 },
Exit = Exit,
},
}
},
},
beatmapInfoWedge = new BeatmapInfoWedge
{