Resize BeatmapCarousel, update carouselitem logic

This commit is contained in:
David Zhao
2019-07-25 15:31:21 +09:00
parent ae66a7e9e4
commit c4bed0e6d2
3 changed files with 32 additions and 23 deletions

View File

@ -45,6 +45,7 @@ namespace osu.Game.Screens.Select
protected const float BACKGROUND_BLUR = 20;
private const float left_area_padding = 20;
private const float filter_control_height = 100;
public readonly FilterControl FilterControl;
@ -121,7 +122,7 @@ namespace osu.Game.Screens.Select
Size = new Vector2(wedged_container_size.X, 1),
Padding = new MarginPadding
{
Bottom = 50,
Bottom = Footer.HEIGHT,
Top = wedged_container_size.Y + left_area_padding,
Left = left_area_padding,
Right = left_area_padding * 2,
@ -147,20 +148,29 @@ namespace osu.Game.Screens.Select
Width = 0.5f,
Children = new Drawable[]
{
Carousel = new BeatmapCarousel
new Container
{
Masking = false,
RelativeSizeAxes = Axes.Both,
Size = new Vector2(1 - wedged_container_size.X, 1),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
SelectionChanged = updateSelectedBeatmap,
BeatmapSetsChanged = carouselBeatmapsLoaded,
Padding = new MarginPadding
{
Top = filter_control_height,
Bottom = Footer.HEIGHT
},
Child = Carousel = new BeatmapCarousel
{
Masking = false,
RelativeSizeAxes = Axes.Both,
Size = new Vector2(1 - wedged_container_size.X, 1),
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
SelectionChanged = updateSelectedBeatmap,
BeatmapSetsChanged = carouselBeatmapsLoaded,
},
},
FilterControl = new FilterControl
{
RelativeSizeAxes = Axes.X,
Height = 100,
Height = filter_control_height,
FilterChanged = c => Carousel.Filter(c),
Background = { Width = 2 },
Exit = () =>