Merge branch 'master' into fix-ss-track-playback

This commit is contained in:
Dan Balasescu
2019-10-09 12:26:07 +09:00
committed by GitHub
42 changed files with 493 additions and 401 deletions

View File

@ -36,6 +36,11 @@ namespace osu.Game.Screens.Select
{
AddRangeInternal(new Drawable[]
{
content = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = BeatmapDetailAreaTabControl.HEIGHT },
},
new BeatmapDetailAreaTabControl
{
RelativeSizeAxes = Axes.X,
@ -58,11 +63,6 @@ namespace osu.Game.Screens.Select
}
},
},
content = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = BeatmapDetailAreaTabControl.HEIGHT },
},
});
AddRange(new Drawable[]

View File

@ -20,6 +20,7 @@ namespace osu.Game.Screens.Select
public static readonly float HEIGHT = 24;
private readonly OsuTabControlCheckbox modsCheckbox;
private readonly OsuTabControl<BeatmapDetailTab> tabs;
private readonly Container tabsContainer;
public Action<BeatmapDetailTab, bool> OnFilter; //passed the selected tab and if mods is checked
@ -39,11 +40,15 @@ namespace osu.Game.Screens.Select
Height = 1,
Colour = Color4.White.Opacity(0.2f),
},
tabs = new OsuTabControl<BeatmapDetailTab>
tabsContainer = new Container
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.Both,
Child = tabs = new OsuTabControl<BeatmapDetailTab>
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
RelativeSizeAxes = Axes.Both,
},
},
modsCheckbox = new OsuTabControlCheckbox
{
@ -74,6 +79,8 @@ namespace osu.Game.Screens.Select
OnFilter?.Invoke(tabs.Current.Value, modsCheckbox.Current.Value);
modsCheckbox.FadeTo(tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 1, 200, Easing.OutQuint);
tabsContainer.Padding = new MarginPadding { Right = tabs.Current.Value == BeatmapDetailTab.Details ? 0 : 100 };
}
}