mirror of https://github.com/ppy/osu
Add padding to so the back button is not in the way
This commit is contained in:
parent
bf6ce390ff
commit
b1243d6a87
|
@ -44,6 +44,18 @@ public abstract class TournamentEditorScreen<TDrawable, TModel> : TournamentScre
|
|||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
BackButton.Receptor receptor = new BackButton.Receptor();
|
||||
backButton = new BackButton(receptor)
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Action = () =>
|
||||
{
|
||||
if (IsSubScreen)
|
||||
backAction.Invoke();
|
||||
}
|
||||
};
|
||||
|
||||
AddRangeInternal(new Drawable[]
|
||||
{
|
||||
new Box
|
||||
|
@ -56,6 +68,7 @@ private void load()
|
|||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Padding = new MarginPadding { Bottom = backButton.Height },
|
||||
Child = flow = new FillFlowContainer<TDrawable>
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
|
@ -64,6 +77,7 @@ private void load()
|
|||
Spacing = new Vector2(20)
|
||||
},
|
||||
},
|
||||
backButton,
|
||||
ControlPanel = new ControlPanel
|
||||
{
|
||||
Children = new Drawable[]
|
||||
|
@ -85,17 +99,7 @@ private void load()
|
|||
});
|
||||
|
||||
if (IsSubScreen)
|
||||
{
|
||||
BackButton.Receptor receptor = new BackButton.Receptor();
|
||||
backButton = new BackButton(receptor)
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Action = () => { backAction.Invoke(); }
|
||||
};
|
||||
AddInternal(backButton);
|
||||
backButton.Show();
|
||||
}
|
||||
|
||||
Storage.CollectionChanged += (_, args) =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue