2020-02-14 06:01:45 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System;
|
2020-07-10 10:37:27 +00:00
|
|
|
using System.Collections.Generic;
|
2020-02-14 06:01:45 +00:00
|
|
|
using System.Linq;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Bindables;
|
2020-02-14 06:36:47 +00:00
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
2020-02-14 06:01:45 +00:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Colour;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Framework.Input.Events;
|
|
|
|
using osu.Framework.Threading;
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Beatmaps.Drawables;
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Graphics.Containers;
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
2020-02-15 07:56:11 +00:00
|
|
|
using osu.Game.Online;
|
2020-02-14 06:01:45 +00:00
|
|
|
using osu.Game.Online.Chat;
|
2020-12-25 04:38:11 +00:00
|
|
|
using osu.Game.Online.Rooms;
|
2020-04-21 07:03:18 +00:00
|
|
|
using osu.Game.Overlays.BeatmapListing.Panels;
|
2021-01-13 08:33:00 +00:00
|
|
|
using osu.Game.Overlays.BeatmapSet;
|
2020-02-14 06:01:45 +00:00
|
|
|
using osu.Game.Rulesets;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
using osu.Game.Screens.Play.HUD;
|
|
|
|
using osuTK;
|
|
|
|
using osuTK.Graphics;
|
|
|
|
|
2020-12-25 15:50:00 +00:00
|
|
|
namespace osu.Game.Screens.OnlinePlay
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2020-02-14 06:36:47 +00:00
|
|
|
public class DrawableRoomPlaylistItem : OsuRearrangeableListItem<PlaylistItem>
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
|
|
|
public Action<PlaylistItem> RequestDeletion;
|
|
|
|
|
2020-02-14 07:55:05 +00:00
|
|
|
public readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
private Container maskingContainer;
|
|
|
|
private Container difficultyIconContainer;
|
|
|
|
private LinkFlowContainer beatmapText;
|
|
|
|
private LinkFlowContainer authorText;
|
2021-01-17 13:40:24 +00:00
|
|
|
private ExplicitContentBeatmapPill explicitContentPill;
|
2020-02-14 06:01:45 +00:00
|
|
|
private ModDisplay modDisplay;
|
|
|
|
|
2021-11-04 03:30:19 +00:00
|
|
|
private readonly Bindable<IBeatmapInfo> beatmap = new Bindable<IBeatmapInfo>();
|
2020-02-14 06:01:45 +00:00
|
|
|
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
|
|
|
|
private readonly BindableList<Mod> requiredMods = new BindableList<Mod>();
|
|
|
|
|
2020-07-10 10:37:27 +00:00
|
|
|
public readonly PlaylistItem Item;
|
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
private readonly bool allowEdit;
|
|
|
|
private readonly bool allowSelection;
|
|
|
|
|
2020-02-20 09:32:28 +00:00
|
|
|
protected override bool ShouldBeConsideredForInput(Drawable child) => allowEdit || !allowSelection || SelectedItem.Value == Model;
|
2020-02-15 07:47:55 +00:00
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
public DrawableRoomPlaylistItem(PlaylistItem item, bool allowEdit, bool allowSelection)
|
|
|
|
: base(item)
|
|
|
|
{
|
2020-07-10 10:37:27 +00:00
|
|
|
Item = item;
|
|
|
|
|
|
|
|
// TODO: edit support should be moved out into a derived class
|
2020-02-14 06:01:45 +00:00
|
|
|
this.allowEdit = allowEdit;
|
|
|
|
this.allowSelection = allowSelection;
|
|
|
|
|
|
|
|
beatmap.BindTo(item.Beatmap);
|
|
|
|
ruleset.BindTo(item.Ruleset);
|
|
|
|
requiredMods.BindTo(item.RequiredMods);
|
2020-09-08 07:36:36 +00:00
|
|
|
|
|
|
|
ShowDragHandle.Value = allowEdit;
|
2020-02-14 06:01:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
2020-02-14 06:36:47 +00:00
|
|
|
if (!allowEdit)
|
|
|
|
HandleColour = HandleColour.Opacity(0);
|
|
|
|
|
|
|
|
maskingContainer.BorderColour = colours.Yellow;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
2020-02-14 12:17:07 +00:00
|
|
|
SelectedItem.BindValueChanged(selected => maskingContainer.BorderThickness = selected.NewValue == Model ? 5 : 0, true);
|
2020-02-14 07:55:05 +00:00
|
|
|
|
2020-02-14 06:36:47 +00:00
|
|
|
beatmap.BindValueChanged(_ => scheduleRefresh());
|
|
|
|
ruleset.BindValueChanged(_ => scheduleRefresh());
|
|
|
|
|
2020-02-17 06:06:14 +00:00
|
|
|
requiredMods.CollectionChanged += (_, __) => scheduleRefresh();
|
2020-02-14 06:36:47 +00:00
|
|
|
|
|
|
|
refresh();
|
|
|
|
}
|
|
|
|
|
2020-02-14 07:55:05 +00:00
|
|
|
private ScheduledDelegate scheduledRefresh;
|
2021-11-01 08:30:19 +00:00
|
|
|
private PanelBackground panelBackground;
|
2020-02-14 07:55:05 +00:00
|
|
|
|
|
|
|
private void scheduleRefresh()
|
|
|
|
{
|
|
|
|
scheduledRefresh?.Cancel();
|
|
|
|
scheduledRefresh = Schedule(refresh);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void refresh()
|
|
|
|
{
|
2021-11-04 03:30:19 +00:00
|
|
|
difficultyIconContainer.Child = new DifficultyIcon(Item.Beatmap.Value, ruleset.Value, requiredMods, performBackgroundDifficultyLookup: false) { Size = new Vector2(32) };
|
2021-11-01 08:30:19 +00:00
|
|
|
|
2021-11-04 03:30:19 +00:00
|
|
|
panelBackground.Beatmap.Value = Item.Beatmap.Value;
|
2020-02-14 07:55:05 +00:00
|
|
|
|
|
|
|
beatmapText.Clear();
|
2021-11-04 03:30:19 +00:00
|
|
|
beatmapText.AddLink(Item.Beatmap.Value.GetDisplayTitleRomanisable(), LinkAction.OpenBeatmap, Item.Beatmap.Value.OnlineID.ToString(), null, text =>
|
2021-07-22 04:18:37 +00:00
|
|
|
{
|
|
|
|
text.Truncate = true;
|
|
|
|
});
|
2020-02-14 07:55:05 +00:00
|
|
|
|
|
|
|
authorText.Clear();
|
|
|
|
|
2021-11-04 09:22:21 +00:00
|
|
|
if (!string.IsNullOrEmpty(Item.Beatmap.Value?.Metadata.Author.Username))
|
2020-02-14 07:55:05 +00:00
|
|
|
{
|
|
|
|
authorText.AddText("mapped by ");
|
2021-11-04 09:22:21 +00:00
|
|
|
authorText.AddUserLink(Item.Beatmap.Value.Metadata.Author);
|
2020-02-14 07:55:05 +00:00
|
|
|
}
|
|
|
|
|
2021-11-04 03:30:19 +00:00
|
|
|
bool hasExplicitContent = (Item.Beatmap.Value.BeatmapSet as IBeatmapSetOnlineInfo)?.HasExplicitContent == true;
|
2021-01-17 13:40:24 +00:00
|
|
|
explicitContentPill.Alpha = hasExplicitContent ? 1 : 0;
|
2021-01-13 08:33:00 +00:00
|
|
|
|
2020-02-14 07:55:05 +00:00
|
|
|
modDisplay.Current.Value = requiredMods.ToArray();
|
|
|
|
}
|
|
|
|
|
2021-02-02 08:09:59 +00:00
|
|
|
protected override Drawable CreateContent()
|
2020-02-14 06:36:47 +00:00
|
|
|
{
|
2021-02-02 08:09:59 +00:00
|
|
|
Action<SpriteText> fontParameters = s => s.Font = OsuFont.Default.With(weight: FontWeight.SemiBold);
|
|
|
|
|
|
|
|
return maskingContainer = new Container
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2021-02-02 08:09:59 +00:00
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
Height = 50,
|
|
|
|
Masking = true,
|
|
|
|
CornerRadius = 10,
|
|
|
|
Children = new Drawable[]
|
2020-02-14 06:36:47 +00:00
|
|
|
{
|
2021-02-02 08:09:59 +00:00
|
|
|
new Box // A transparent box that forces the border to be drawn if the panel background is opaque
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2021-02-02 08:09:59 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Alpha = 0,
|
|
|
|
AlwaysPresent = true
|
|
|
|
},
|
2021-11-01 08:30:19 +00:00
|
|
|
panelBackground = new PanelBackground
|
2021-02-02 08:09:59 +00:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
2021-07-22 04:18:37 +00:00
|
|
|
new GridContainer
|
2021-02-02 08:09:59 +00:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2021-07-22 04:18:37 +00:00
|
|
|
ColumnDimensions = new[]
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
new Dimension(),
|
|
|
|
new Dimension(GridSizeMode.AutoSize),
|
|
|
|
},
|
|
|
|
Content = new[]
|
|
|
|
{
|
|
|
|
new Drawable[]
|
2021-02-02 08:09:59 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
difficultyIconContainer = new Container
|
|
|
|
{
|
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Margin = new MarginPadding { Left = 8, Right = 8, },
|
|
|
|
},
|
|
|
|
new FillFlowContainer
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Children = new Drawable[]
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
beatmapText = new LinkFlowContainer(fontParameters)
|
2021-01-13 08:33:00 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
RelativeSizeAxes = Axes.X,
|
2021-11-03 17:08:12 +00:00
|
|
|
// workaround to ensure only the first line of text shows, emulating truncation (but without ellipsis at the end).
|
|
|
|
// TODO: remove when text/link flow can support truncation with ellipsis natively.
|
|
|
|
Height = OsuFont.DEFAULT_FONT_SIZE,
|
|
|
|
Masking = true
|
2021-07-22 04:18:37 +00:00
|
|
|
},
|
|
|
|
new FillFlowContainer
|
|
|
|
{
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Direction = FillDirection.Horizontal,
|
|
|
|
Spacing = new Vector2(10f, 0),
|
|
|
|
Children = new Drawable[]
|
2021-01-13 08:33:00 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
new FillFlowContainer
|
2021-01-13 08:33:00 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Direction = FillDirection.Horizontal,
|
|
|
|
Spacing = new Vector2(10f, 0),
|
|
|
|
Children = new Drawable[]
|
2021-02-02 08:09:59 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
authorText = new LinkFlowContainer(fontParameters) { AutoSizeAxes = Axes.Both },
|
|
|
|
explicitContentPill = new ExplicitContentBeatmapPill
|
|
|
|
{
|
|
|
|
Alpha = 0f,
|
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
Margin = new MarginPadding { Top = 3f },
|
|
|
|
}
|
|
|
|
},
|
2021-02-02 08:09:59 +00:00
|
|
|
},
|
2021-07-22 04:18:37 +00:00
|
|
|
new Container
|
2021-02-02 08:09:59 +00:00
|
|
|
{
|
2021-07-22 04:18:37 +00:00
|
|
|
Anchor = Anchor.CentreLeft,
|
|
|
|
Origin = Anchor.CentreLeft,
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Child = modDisplay = new ModDisplay
|
|
|
|
{
|
|
|
|
Scale = new Vector2(0.4f),
|
|
|
|
ExpansionMode = ExpansionMode.AlwaysExpanded
|
|
|
|
}
|
2021-02-02 08:09:59 +00:00
|
|
|
}
|
2021-01-13 08:33:00 +00:00
|
|
|
}
|
2020-02-14 06:01:45 +00:00
|
|
|
}
|
|
|
|
}
|
2021-07-22 04:18:37 +00:00
|
|
|
},
|
|
|
|
new FillFlowContainer
|
|
|
|
{
|
|
|
|
Anchor = Anchor.CentreRight,
|
|
|
|
Origin = Anchor.CentreRight,
|
|
|
|
Direction = FillDirection.Horizontal,
|
|
|
|
Margin = new MarginPadding { Left = 8, Right = 10, },
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Spacing = new Vector2(5),
|
|
|
|
ChildrenEnumerable = CreateButtons().Select(button => button.With(b =>
|
|
|
|
{
|
|
|
|
b.Anchor = Anchor.Centre;
|
|
|
|
b.Origin = Anchor.Centre;
|
|
|
|
}))
|
2020-02-14 06:01:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-02 08:09:59 +00:00
|
|
|
},
|
2020-02-14 06:36:47 +00:00
|
|
|
}
|
2021-02-02 08:09:59 +00:00
|
|
|
};
|
|
|
|
}
|
2020-02-14 06:01:45 +00:00
|
|
|
|
2020-07-10 10:37:27 +00:00
|
|
|
protected virtual IEnumerable<Drawable> CreateButtons() =>
|
|
|
|
new Drawable[]
|
|
|
|
{
|
2021-11-01 06:10:32 +00:00
|
|
|
new PlaylistDownloadButton(Item),
|
2021-02-02 07:57:08 +00:00
|
|
|
new PlaylistRemoveButton
|
2020-07-10 10:37:27 +00:00
|
|
|
{
|
2021-02-02 07:57:08 +00:00
|
|
|
Size = new Vector2(30, 30),
|
2020-07-10 10:37:27 +00:00
|
|
|
Alpha = allowEdit ? 1 : 0,
|
|
|
|
Action = () => RequestDeletion?.Invoke(Model),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-02-02 07:57:08 +00:00
|
|
|
public class PlaylistRemoveButton : GrayButton
|
|
|
|
{
|
|
|
|
public PlaylistRemoveButton()
|
|
|
|
: base(FontAwesome.Solid.MinusSquare)
|
|
|
|
{
|
|
|
|
TooltipText = "Remove from playlist";
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Icon.Scale = new Vector2(0.8f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
protected override bool OnClick(ClickEvent e)
|
|
|
|
{
|
|
|
|
if (allowSelection)
|
2020-02-14 07:55:05 +00:00
|
|
|
SelectedItem.Value = Model;
|
2020-02-14 06:01:45 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-10-29 02:59:07 +00:00
|
|
|
private sealed class PlaylistDownloadButton : BeatmapPanelDownloadButton
|
2020-02-15 07:56:11 +00:00
|
|
|
{
|
2020-06-02 05:04:51 +00:00
|
|
|
private readonly PlaylistItem playlistItem;
|
|
|
|
|
|
|
|
[Resolved]
|
|
|
|
private BeatmapManager beatmapManager { get; set; }
|
|
|
|
|
2021-10-27 12:26:26 +00:00
|
|
|
// required for download tracking, as this button hides itself. can probably be removed with a bit of consideration.
|
|
|
|
public override bool IsPresent => true;
|
2021-01-17 16:17:14 +00:00
|
|
|
|
2021-11-01 06:10:32 +00:00
|
|
|
private const float width = 50;
|
|
|
|
|
2020-06-02 05:04:51 +00:00
|
|
|
public PlaylistDownloadButton(PlaylistItem playlistItem)
|
2021-11-04 03:30:19 +00:00
|
|
|
: base(playlistItem.Beatmap.Value.BeatmapSet)
|
2020-02-15 07:56:11 +00:00
|
|
|
{
|
2020-06-02 05:04:51 +00:00
|
|
|
this.playlistItem = playlistItem;
|
2021-11-01 06:10:32 +00:00
|
|
|
|
|
|
|
Size = new Vector2(width, 30);
|
2020-02-15 07:56:11 +00:00
|
|
|
Alpha = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
2021-10-27 12:26:26 +00:00
|
|
|
State.BindValueChanged(stateChanged, true);
|
2021-10-29 02:59:07 +00:00
|
|
|
|
|
|
|
// base implementation calls FinishTransforms, so should be run after the above state update.
|
2020-02-15 07:56:11 +00:00
|
|
|
base.LoadComplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void stateChanged(ValueChangedEvent<DownloadState> state)
|
|
|
|
{
|
2020-06-02 05:04:51 +00:00
|
|
|
switch (state.NewValue)
|
|
|
|
{
|
|
|
|
case DownloadState.LocallyAvailable:
|
|
|
|
// Perform a local query of the beatmap by beatmap checksum, and reset the state if not matching.
|
2021-11-04 03:30:19 +00:00
|
|
|
if (beatmapManager.QueryBeatmap(b => b.MD5Hash == playlistItem.Beatmap.Value.MD5Hash) == null)
|
2020-06-02 05:04:51 +00:00
|
|
|
State.Value = DownloadState.NotDownloaded;
|
|
|
|
else
|
2021-11-01 06:10:32 +00:00
|
|
|
{
|
|
|
|
this.FadeTo(0, 500)
|
|
|
|
.ResizeWidthTo(0, 500, Easing.OutQuint);
|
|
|
|
}
|
2020-06-02 05:04:51 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2021-11-01 06:10:32 +00:00
|
|
|
this.ResizeWidthTo(width, 500, Easing.OutQuint)
|
|
|
|
.FadeTo(1, 500);
|
2020-06-02 05:04:51 +00:00
|
|
|
break;
|
|
|
|
}
|
2020-02-15 07:56:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
// For now, this is the same implementation as in PanelBackground, but supports a beatmap info rather than a working beatmap
|
|
|
|
private class PanelBackground : Container // todo: should be a buffered container (https://github.com/ppy/osu-framework/issues/3222)
|
|
|
|
{
|
2021-11-01 08:30:19 +00:00
|
|
|
public readonly Bindable<IBeatmapInfo> Beatmap = new Bindable<IBeatmapInfo>();
|
2020-02-14 06:01:45 +00:00
|
|
|
|
|
|
|
public PanelBackground()
|
|
|
|
{
|
2021-10-27 06:20:01 +00:00
|
|
|
UpdateableBeatmapBackgroundSprite backgroundSprite;
|
|
|
|
|
2020-02-14 06:01:45 +00:00
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
2021-10-27 06:20:01 +00:00
|
|
|
backgroundSprite = new UpdateableBeatmapBackgroundSprite
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
FillMode = FillMode.Fill,
|
|
|
|
},
|
2020-02-27 04:32:23 +00:00
|
|
|
new FillFlowContainer
|
2020-02-14 06:01:45 +00:00
|
|
|
{
|
|
|
|
Depth = -1,
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2020-02-27 04:32:23 +00:00
|
|
|
Direction = FillDirection.Horizontal,
|
2020-02-14 06:01:45 +00:00
|
|
|
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
|
|
|
|
Shear = new Vector2(0.8f, 0),
|
|
|
|
Alpha = 0.5f,
|
|
|
|
Children = new[]
|
|
|
|
{
|
|
|
|
// The left half with no gradient applied
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Colour = Color4.Black,
|
|
|
|
Width = 0.4f,
|
|
|
|
},
|
2021-02-02 21:05:25 +00:00
|
|
|
// Piecewise-linear gradient with 2 segments to make it appear smoother
|
2020-02-14 06:01:45 +00:00
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2021-02-02 07:57:27 +00:00
|
|
|
Colour = ColourInfo.GradientHorizontal(Color4.Black, new Color4(0f, 0f, 0f, 0.7f)),
|
|
|
|
Width = 0.4f,
|
2020-02-14 06:01:45 +00:00
|
|
|
},
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2021-02-02 07:57:27 +00:00
|
|
|
Colour = ColourInfo.GradientHorizontal(new Color4(0f, 0f, 0f, 0.7f), new Color4(0, 0, 0, 0.4f)),
|
|
|
|
Width = 0.4f,
|
2020-02-14 06:01:45 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-10-27 06:20:01 +00:00
|
|
|
|
|
|
|
// manual binding required as playlists don't expose IBeatmapInfo currently.
|
|
|
|
// may be removed in the future if this changes.
|
|
|
|
Beatmap.BindValueChanged(beatmap => backgroundSprite.Beatmap.Value = beatmap.NewValue);
|
2020-02-14 06:01:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|