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