mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 11:22:55 +08:00
Use content instead of exposing the flow container
This commit is contained in:
parent
064d081138
commit
06a51297a3
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Flow.Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var item in Flow.OfType<LabelledTextBox>())
|
foreach (var item in Children.OfType<LabelledTextBox>())
|
||||||
item.OnCommit += onCommit;
|
item.OnCommit += onCommit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
};
|
};
|
||||||
|
|
||||||
Flow.Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
backgroundSpriteContainer = new Container
|
backgroundSpriteContainer = new Container
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -14,7 +13,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
{
|
{
|
||||||
internal class SetupSection : Container
|
internal class SetupSection : Container
|
||||||
{
|
{
|
||||||
protected FillFlowContainer Flow;
|
private readonly FillFlowContainer flow;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
protected OsuColour Colours { get; private set; }
|
protected OsuColour Colours { get; private set; }
|
||||||
@ -22,7 +21,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
protected IBindable<WorkingBeatmap> Beatmap { get; private set; }
|
protected IBindable<WorkingBeatmap> Beatmap { get; private set; }
|
||||||
|
|
||||||
public override void Add(Drawable drawable) => throw new InvalidOperationException("Use Flow.Add instead");
|
protected override Container<Drawable> Content => flow;
|
||||||
|
|
||||||
public SetupSection()
|
public SetupSection()
|
||||||
{
|
{
|
||||||
@ -31,7 +30,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
|
|
||||||
Padding = new MarginPadding(10);
|
Padding = new MarginPadding(10);
|
||||||
|
|
||||||
InternalChild = Flow = new FillFlowContainer
|
InternalChild = flow = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Loading…
Reference in New Issue
Block a user