mirror of
https://github.com/ppy/osu
synced 2025-02-20 20:47:09 +00:00
Allow null logo facade
This commit is contained in:
parent
0f08c2a479
commit
7b7e7a86bf
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -27,7 +28,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
private readonly Bindable<IReadOnlyList<Mod>> mods;
|
private readonly Bindable<IReadOnlyList<Mod>> mods;
|
||||||
private readonly Drawable facade;
|
private readonly Drawable logoFacade;
|
||||||
private LoadingSpinner loading;
|
private LoadingSpinner loading;
|
||||||
|
|
||||||
public IBindable<IReadOnlyList<Mod>> Mods => mods;
|
public IBindable<IReadOnlyList<Mod>> Mods => mods;
|
||||||
@ -46,10 +47,10 @@ namespace osu.Game.Screens.Play
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BeatmapMetadataDisplay(WorkingBeatmap beatmap, Bindable<IReadOnlyList<Mod>> mods, Drawable facade)
|
public BeatmapMetadataDisplay(WorkingBeatmap beatmap, Bindable<IReadOnlyList<Mod>> mods, [CanBeNull] Drawable logoFacade)
|
||||||
{
|
{
|
||||||
this.beatmap = beatmap;
|
this.beatmap = beatmap;
|
||||||
this.facade = facade;
|
this.logoFacade = logoFacade;
|
||||||
|
|
||||||
this.mods = new Bindable<IReadOnlyList<Mod>>();
|
this.mods = new Bindable<IReadOnlyList<Mod>>();
|
||||||
this.mods.BindTo(mods);
|
this.mods.BindTo(mods);
|
||||||
@ -73,11 +74,11 @@ namespace osu.Game.Screens.Play
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
facade.With(d =>
|
logoFacade?.With(d =>
|
||||||
{
|
{
|
||||||
d.Anchor = Anchor.TopCentre;
|
d.Anchor = Anchor.TopCentre;
|
||||||
d.Origin = Anchor.TopCentre;
|
d.Origin = Anchor.TopCentre;
|
||||||
}),
|
}) ?? Drawable.Empty(),
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
Text = new RomanisableString(metadata.TitleUnicode, metadata.Title),
|
Text = new RomanisableString(metadata.TitleUnicode, metadata.Title),
|
||||||
|
Loading…
Reference in New Issue
Block a user