mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge remote-tracking branch 'upstream/master' into beatmap-overlay-download
This commit is contained in:
@ -39,9 +39,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
if (value == beatmap) return;
|
||||
beatmap = value;
|
||||
|
||||
length.Value = TimeSpan.FromMilliseconds(beatmap.OnlineInfo.Length).ToString(@"m\:ss");
|
||||
circleCount.Value = beatmap.OnlineInfo.CircleCount.ToString("N0");
|
||||
sliderCount.Value = beatmap.OnlineInfo.SliderCount.ToString("N0");
|
||||
length.Value = TimeSpan.FromSeconds(beatmap.OnlineInfo.Length).ToString(@"m\:ss");
|
||||
circleCount.Value = beatmap.OnlineInfo.CircleCount.ToString();
|
||||
sliderCount.Value = beatmap.OnlineInfo.SliderCount.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
private readonly Box tabsBg;
|
||||
private readonly Container coverContainer;
|
||||
private readonly OsuSpriteText title, artist;
|
||||
private readonly Container noVideoButtons;
|
||||
private readonly FillFlowContainer videoButtons;
|
||||
private readonly AuthorInfo author;
|
||||
private readonly Container downloadButtonsContainer;
|
||||
public Details Details;
|
||||
@ -51,6 +53,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
title.Text = BeatmapSet.Metadata.Title;
|
||||
artist.Text = BeatmapSet.Metadata.Artist;
|
||||
|
||||
noVideoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 0 : 1, transition_duration);
|
||||
videoButtons.FadeTo(BeatmapSet.OnlineInfo.HasVideo ? 1 : 0, transition_duration);
|
||||
|
||||
cover?.FadeOut(400, Easing.Out);
|
||||
coverContainer.Add(cover = new DelayedLoadWrapper(new BeatmapSetCover(BeatmapSet)
|
||||
{
|
||||
@ -82,9 +87,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Radius = 3,
|
||||
Offset = new Vector2(0f, 1f),
|
||||
};
|
||||
|
||||
Container noVideoButtons;
|
||||
FillFlowContainer videoButtons;
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -216,21 +218,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
};
|
||||
|
||||
Picker.Beatmap.ValueChanged += b =>
|
||||
{
|
||||
Details.Beatmap = b;
|
||||
|
||||
if (b.OnlineInfo.HasVideo)
|
||||
{
|
||||
noVideoButtons.FadeOut(transition_duration);
|
||||
videoButtons.FadeIn(transition_duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
noVideoButtons.FadeIn(transition_duration);
|
||||
videoButtons.FadeOut(transition_duration);
|
||||
}
|
||||
};
|
||||
Picker.Beatmap.ValueChanged += b => Details.Beatmap = b;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -74,20 +74,18 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Right = metadata_width + BeatmapSetOverlay.RIGHT_WIDTH + spacing * 2 },
|
||||
Child = new ScrollContainer
|
||||
Child = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollbarVisible = false,
|
||||
Child = description = new MetadataSection("Description"),
|
||||
},
|
||||
},
|
||||
new ScrollContainer
|
||||
new Container
|
||||
{
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = metadata_width,
|
||||
ScrollbarVisible = false,
|
||||
Padding = new MarginPadding { Horizontal = 10 },
|
||||
Margin = new MarginPadding { Right = BeatmapSetOverlay.RIGHT_WIDTH + spacing },
|
||||
Child = new FillFlowContainer
|
||||
|
@ -29,7 +29,10 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
if (value == beatmap) return;
|
||||
beatmap = value;
|
||||
|
||||
var rate = (float)beatmap.OnlineInfo.PassCount / beatmap.OnlineInfo.PlayCount;
|
||||
int passCount = beatmap.OnlineInfo.PassCount;
|
||||
int playCount = beatmap.OnlineInfo.PlayCount;
|
||||
|
||||
var rate = playCount != 0 ? (float)passCount / playCount : 0;
|
||||
successPercent.Text = rate.ToString("P0");
|
||||
successRate.Length = rate;
|
||||
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);
|
||||
|
Reference in New Issue
Block a user