1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

Ask for VisibilityContainer explicitly

This commit is contained in:
Salman Ahmed 2024-07-10 11:12:52 +03:00
parent 9a88281ab0
commit 002679ebb0
6 changed files with 7 additions and 6 deletions

View File

@ -210,7 +210,7 @@ namespace osu.Game.Tests.Visual.UserInterface
return false;
}
public override Drawable CreateFooterContent() => new TestFooterContent();
public override VisibilityContainer CreateFooterContent() => new TestFooterContent();
public partial class TestFooterContent : VisibilityContainer
{

View File

@ -150,7 +150,7 @@ namespace osu.Game.Overlays
private FirstRunSetupFooterContent? currentFooterContent;
public override Drawable CreateFooterContent()
public override VisibilityContainer CreateFooterContent()
{
currentFooterContent = new FirstRunSetupFooterContent
{

View File

@ -256,7 +256,7 @@ namespace osu.Game.Overlays.Mods
private ModSelectFooterContent? currentFooterContent;
public override Drawable CreateFooterContent() => currentFooterContent = new ModSelectFooterContent(this)
public override VisibilityContainer CreateFooterContent() => currentFooterContent = new ModSelectFooterContent(this)
{
Beatmap = { BindTarget = Beatmap },
ActiveMods = { BindTarget = ActiveMods },

View File

@ -104,7 +104,7 @@ namespace osu.Game.Overlays.Mods
/// <summary>
/// Creates content to be displayed on the game-wide footer.
/// </summary>
public virtual Drawable CreateFooterContent() => Empty();
public virtual VisibilityContainer? CreateFooterContent() => null;
/// <summary>
/// Invoked when the back button in the footer is pressed.

View File

@ -218,7 +218,7 @@ namespace osu.Game.Screens.Footer
updateColourScheme(overlay.ColourProvider.ColourScheme);
var content = overlay.CreateFooterContent();
var content = overlay.CreateFooterContent() ?? Empty();
Add(contentContainer = new Container
{

View File

@ -6,6 +6,7 @@ using osu.Game.Overlays;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Mods;
using osu.Game.Rulesets.Mods;
@ -34,7 +35,7 @@ namespace osu.Game.Screens.OnlinePlay
protected override ModColumn CreateModColumn(ModType modType) => new ModColumn(modType, true);
public override Drawable CreateFooterContent() => currentFooterContent = new FreeModSelectFooterContent(this)
public override VisibilityContainer CreateFooterContent() => currentFooterContent = new FreeModSelectFooterContent(this)
{
Beatmap = { BindTarget = Beatmap },
ActiveMods = { BindTarget = ActiveMods },