mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Calculate content height automatically
This commit is contained in:
@ -70,7 +70,6 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
Content.Add(beatmapContainer = new Container<DrawableCarouselItem>
|
||||
{
|
||||
X = 100,
|
||||
Y = MAX_HEIGHT,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
});
|
||||
|
@ -20,6 +20,9 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
public readonly CarouselHeader Header;
|
||||
|
||||
/// <summary>
|
||||
/// Optional content which sits below the header.
|
||||
/// </summary>
|
||||
protected readonly Container<Drawable> Content;
|
||||
|
||||
protected readonly Container MovementContainer;
|
||||
@ -89,6 +92,9 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
// avoid using fill flow for performance reasons. header size doesn't change after load.
|
||||
Content.Y = Header.Height;
|
||||
|
||||
UpdateItem();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user