mirror of https://github.com/ppy/osu
Match panel with web
This commit is contained in:
parent
9c0eff72b5
commit
1095669a55
|
@ -36,6 +36,11 @@ public class BeatmapSetOnlineInfo
|
|||
/// </summary>
|
||||
public bool HasVideo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this beatmap set has a storyboard.
|
||||
/// </summary>
|
||||
public bool HasStoryboard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The different sizes of cover art for this beatmap set.
|
||||
/// </summary>
|
||||
|
|
|
@ -30,6 +30,9 @@ public class APIResponseBeatmapSet : BeatmapMetadata // todo: this is a bit wron
|
|||
[JsonProperty(@"video")]
|
||||
private bool hasVideo { get; set; }
|
||||
|
||||
[JsonProperty(@"storyboard")]
|
||||
private bool hasStoryboard { get; set; }
|
||||
|
||||
[JsonProperty(@"status")]
|
||||
private BeatmapSetOnlineStatus status { get; set; }
|
||||
|
||||
|
@ -65,6 +68,7 @@ public BeatmapSetInfo ToBeatmapSet(RulesetStore rulesets)
|
|||
BPM = bpm,
|
||||
Status = status,
|
||||
HasVideo = hasVideo,
|
||||
HasStoryboard = hasStoryboard,
|
||||
Submitted = submitted,
|
||||
Ranked = ranked,
|
||||
LastUpdated = lastUpdated,
|
||||
|
|
|
@ -149,7 +149,7 @@ private void load(OsuColour colours, LocalisationEngine localisation)
|
|||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Text = $"from {SetInfo.Metadata.Source}",
|
||||
Text = $"{SetInfo.Metadata.Source}",
|
||||
TextSize = 14,
|
||||
Shadow = false,
|
||||
Colour = colours.Gray5,
|
||||
|
@ -195,18 +195,18 @@ private void load(OsuColour colours, LocalisationEngine localisation)
|
|||
new Statistic(FontAwesome.fa_heart, SetInfo.OnlineInfo?.FavouriteCount ?? 0),
|
||||
},
|
||||
},
|
||||
playButton = new PlayButton(SetInfo)
|
||||
{
|
||||
Margin = new MarginPadding { Top = 5, Left = 10 },
|
||||
Size = new Vector2(30),
|
||||
Alpha = 0,
|
||||
},
|
||||
statusContainer = new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Top = 5, Left = 5 },
|
||||
Spacing = new Vector2(5),
|
||||
},
|
||||
playButton = new PlayButton(SetInfo)
|
||||
{
|
||||
Margin = new MarginPadding { Top = 5, Left = 10 },
|
||||
Size = new Vector2(30),
|
||||
Alpha = 0,
|
||||
},
|
||||
});
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasVideo ?? false)
|
||||
|
@ -214,6 +214,11 @@ private void load(OsuColour colours, LocalisationEngine localisation)
|
|||
statusContainer.Add(new IconPill(FontAwesome.fa_film));
|
||||
}
|
||||
|
||||
if (SetInfo.OnlineInfo?.HasStoryboard ?? false)
|
||||
{
|
||||
statusContainer.Add(new IconPill(FontAwesome.fa_image));
|
||||
}
|
||||
|
||||
statusContainer.Add(new BeatmapSetOnlineStatusPill(12, new MarginPadding { Horizontal = 10, Vertical = 5 })
|
||||
{
|
||||
Status = SetInfo.OnlineInfo?.Status ?? BeatmapSetOnlineStatus.None,
|
||||
|
@ -233,5 +238,19 @@ protected override void OnHoverLost(InputState state)
|
|||
|
||||
statusContainer.FadeIn(120, Easing.InOutQuint);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (PreviewPlaying)
|
||||
{
|
||||
statusContainer.Hide();
|
||||
}
|
||||
else if (!IsHovered)
|
||||
{
|
||||
statusContainer.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ private void updatePreviewTrack(bool playing)
|
|||
return;
|
||||
}
|
||||
|
||||
icon.Icon = playing ? FontAwesome.fa_pause : FontAwesome.fa_play;
|
||||
icon.Icon = playing ? FontAwesome.fa_stop : FontAwesome.fa_play;
|
||||
icon.FadeColour(playing || IsHovered ? hoverColour : Color4.White, 120, Easing.InOutQuint);
|
||||
|
||||
if (playing)
|
||||
|
|
Loading…
Reference in New Issue