Remove DrawableCarouselItem.Update updating of height

Marginal from a performance aspect, but reads better.
This commit is contained in:
Dean Herbert
2022-01-30 12:34:08 +09:00
parent e9f3e7f5cb
commit a06287e76a
2 changed files with 9 additions and 12 deletions

View File

@ -36,9 +36,9 @@ namespace osu.Game.Screens.Select.Carousel
/// <summary>
/// The height of a carousel beatmap, including vertical spacing.
/// </summary>
public const float HEIGHT = height + CAROUSEL_BEATMAP_SPACING;
public const float HEIGHT = header_height + CAROUSEL_BEATMAP_SPACING;
private const float height = MAX_HEIGHT * 0.6f;
private const float header_height = MAX_HEIGHT * 0.6f;
private readonly BeatmapInfo beatmapInfo;
@ -67,6 +67,7 @@ namespace osu.Game.Screens.Select.Carousel
private CancellationTokenSource starDifficultyCancellationSource;
public DrawableCarouselBeatmap(CarouselBeatmap panel)
: base(header_height)
{
beatmapInfo = panel.BeatmapInfo;
Item = panel;
@ -75,8 +76,6 @@ namespace osu.Game.Screens.Select.Carousel
[BackgroundDependencyLoader(true)]
private void load(BeatmapManager manager, SongSelect songSelect)
{
Header.Height = height;
if (songSelect != null)
{
startRequested = b => songSelect.FinaliseSelection(b);