1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Make CreateContent a method again

This commit is contained in:
Andrei Zavatski 2019-12-27 06:36:41 +03:00
parent 2d167a5161
commit 04a4821a9f
3 changed files with 7 additions and 5 deletions

View File

@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Changelog
protected override Drawable CreateBackground() => new HeaderBackground();
protected override Drawable CreateContent => new Container
protected override Drawable CreateContent() => new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -99,13 +99,15 @@ namespace osu.Game.Overlays
}
});
if (CreateContent != null)
flow.Add(CreateContent);
var content = CreateContent();
if (content != null)
flow.Add(content);
}
protected abstract Drawable CreateBackground();
protected virtual Drawable CreateContent => null;
protected virtual Drawable CreateContent() => null;
protected abstract ScreenTitle CreateTitle();
}

View File

@ -62,7 +62,7 @@ namespace osu.Game.Overlays.Profile
}
};
protected override Drawable CreateContent => new FillFlowContainer
protected override Drawable CreateContent() => new FillFlowContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,