mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Update with framework bindable changes
This commit is contained in:
@ -181,8 +181,8 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
};
|
||||
|
||||
Picker.Beatmap.ValueChanged += b => Details.Beatmap = b;
|
||||
Picker.Beatmap.ValueChanged += b => externalLink.Link = $@"https://osu.ppy.sh/beatmapsets/{BeatmapSet.Value?.OnlineBeatmapSetID}#{b?.Ruleset.ShortName}/{b?.OnlineBeatmapID}";
|
||||
Picker.Beatmap.ValueChanged += e => Details.Beatmap = e.NewValue;
|
||||
Picker.Beatmap.ValueChanged += e => externalLink.Link = $@"https://osu.ppy.sh/beatmapsets/{BeatmapSet.Value?.OnlineBeatmapSetID}#{e.NewValue?.Ruleset.ShortName}/{e.NewValue?.OnlineBeatmapID}";
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -192,16 +192,16 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
State.BindValueChanged(_ => updateDownloadButtons());
|
||||
|
||||
BeatmapSet.BindValueChanged(beatmapSet =>
|
||||
BeatmapSet.BindValueChanged(e =>
|
||||
{
|
||||
Picker.BeatmapSet = author.BeatmapSet = Details.BeatmapSet = beatmapSet;
|
||||
Picker.BeatmapSet = author.BeatmapSet = Details.BeatmapSet = e.NewValue;
|
||||
|
||||
title.Text = beatmapSet?.Metadata.Title ?? string.Empty;
|
||||
artist.Text = beatmapSet?.Metadata.Artist ?? string.Empty;
|
||||
onlineStatusPill.Status = beatmapSet?.OnlineInfo.Status ?? BeatmapSetOnlineStatus.None;
|
||||
cover.BeatmapSet = beatmapSet;
|
||||
title.Text = e.NewValue?.Metadata.Title ?? string.Empty;
|
||||
artist.Text = e.NewValue?.Metadata.Artist ?? string.Empty;
|
||||
onlineStatusPill.Status = e.NewValue?.OnlineInfo.Status ?? BeatmapSetOnlineStatus.None;
|
||||
cover.BeatmapSet = e.NewValue;
|
||||
|
||||
if (beatmapSet != null)
|
||||
if (e.NewValue != null)
|
||||
{
|
||||
downloadButtonsContainer.FadeIn(transition_duration);
|
||||
favouriteButton.FadeIn(transition_duration);
|
||||
@ -223,7 +223,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
{
|
||||
case DownloadState.LocallyAvailable:
|
||||
// temporary for UX until new design is implemented.
|
||||
downloadButtonsContainer.Child = new osu.Game.Overlays.Direct.DownloadButton(BeatmapSet)
|
||||
downloadButtonsContainer.Child = new osu.Game.Overlays.Direct.DownloadButton(BeatmapSet.Value)
|
||||
{
|
||||
Width = 50,
|
||||
RelativeSizeAxes = Axes.Y
|
||||
@ -232,12 +232,12 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
case DownloadState.Downloading:
|
||||
case DownloadState.Downloaded:
|
||||
// temporary to avoid showing two buttons for maps with novideo. will be fixed in new beatmap overlay design.
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet);
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
|
||||
break;
|
||||
default:
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet);
|
||||
downloadButtonsContainer.Child = new DownloadButton(BeatmapSet.Value);
|
||||
if (BeatmapSet.Value.OnlineInfo.HasVideo)
|
||||
downloadButtonsContainer.Add(new DownloadButton(BeatmapSet, true));
|
||||
downloadButtonsContainer.Add(new DownloadButton(BeatmapSet.Value, true));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user