mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Remove DrawableCarouselItem.Update
updating of height
Marginal from a performance aspect, but reads better.
This commit is contained in:
@ -60,7 +60,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
}
|
||||
}
|
||||
|
||||
protected DrawableCarouselItem()
|
||||
protected DrawableCarouselItem(float headerHeight = MAX_HEIGHT)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
||||
@ -73,10 +73,14 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Header = new CarouselHeader(),
|
||||
Header = new CarouselHeader
|
||||
{
|
||||
Height = headerHeight,
|
||||
},
|
||||
Content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Y = headerHeight,
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -92,12 +96,6 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
UpdateItem();
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
Content.Y = Header.Height;
|
||||
}
|
||||
|
||||
protected virtual void UpdateItem()
|
||||
{
|
||||
if (item == null)
|
||||
|
Reference in New Issue
Block a user