1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:52:56 +08:00

Remove remaining usage of EditorRoundedScreen

This commit is contained in:
Dean Herbert 2022-05-24 17:13:44 +09:00
parent 1d196262d0
commit c02ec05056
5 changed files with 14 additions and 60 deletions

View File

@ -1,53 +0,0 @@
// 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.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Overlays;
namespace osu.Game.Screens.Edit
{
public class EditorRoundedScreen : EditorScreen
{
public const int HORIZONTAL_PADDING = 100;
private Container roundedContent;
protected override Container<Drawable> Content => roundedContent;
public EditorRoundedScreen(EditorScreenMode mode)
: base(mode)
{
}
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
base.Content.Add(new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(50),
Child = new Container
{
RelativeSizeAxes = Axes.Both,
Masking = true,
CornerRadius = 10,
Children = new Drawable[]
{
new Box
{
Colour = colourProvider.Background3,
RelativeSizeAxes = Axes.Both,
},
roundedContent = new Container
{
RelativeSizeAxes = Axes.Both,
},
}
}
});
}
}
}

View File

@ -4,11 +4,13 @@
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Overlays;
namespace osu.Game.Screens.Edit.Setup namespace osu.Game.Screens.Edit.Setup
{ {
public class SetupScreen : EditorRoundedScreen public class SetupScreen : EditorScreen
{ {
[Cached] [Cached]
private SectionsContainer<SetupSection> sections { get; } = new SetupScreenSectionsContainer(); private SectionsContainer<SetupSection> sections { get; } = new SetupScreenSectionsContainer();
@ -22,7 +24,7 @@ namespace osu.Game.Screens.Edit.Setup
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(EditorBeatmap beatmap) private void load(EditorBeatmap beatmap, OverlayColourProvider colourProvider)
{ {
var sectionsEnumerable = new List<SetupSection> var sectionsEnumerable = new List<SetupSection>
{ {
@ -37,6 +39,12 @@ namespace osu.Game.Screens.Edit.Setup
if (rulesetSpecificSection != null) if (rulesetSpecificSection != null)
sectionsEnumerable.Add(rulesetSpecificSection); sectionsEnumerable.Add(rulesetSpecificSection);
Add(new Box
{
Colour = colourProvider.Background2,
RelativeSizeAxes = Axes.Both,
});
Add(sections.With(s => Add(sections.With(s =>
{ {
s.RelativeSizeAxes = Axes.Both; s.RelativeSizeAxes = Axes.Both;

View File

@ -93,7 +93,7 @@ namespace osu.Game.Screens.Edit.Setup
public SetupScreenTabControl() public SetupScreenTabControl()
{ {
TabContainer.Margin = new MarginPadding { Horizontal = EditorRoundedScreen.HORIZONTAL_PADDING }; TabContainer.Margin = new MarginPadding { Horizontal = 100 };
AddInternal(background = new Box AddInternal(background = new Box
{ {

View File

@ -40,7 +40,7 @@ namespace osu.Game.Screens.Edit.Setup
Padding = new MarginPadding Padding = new MarginPadding
{ {
Vertical = 10, Vertical = 10,
Horizontal = EditorRoundedScreen.HORIZONTAL_PADDING Horizontal = 100
}; };
InternalChild = new FillFlowContainer InternalChild = new FillFlowContainer

View File

@ -11,7 +11,7 @@ using osu.Game.Rulesets.Edit.Checks.Components;
namespace osu.Game.Screens.Edit.Verify namespace osu.Game.Screens.Edit.Verify
{ {
[Cached] [Cached]
public class VerifyScreen : EditorRoundedScreen public class VerifyScreen : EditorScreen
{ {
public readonly Bindable<Issue> SelectedIssue = new Bindable<Issue>(); public readonly Bindable<Issue> SelectedIssue = new Bindable<Issue>();
@ -32,7 +32,6 @@ namespace osu.Game.Screens.Edit.Verify
InterpretedDifficulty.Default = BeatmapDifficultyCache.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating); InterpretedDifficulty.Default = BeatmapDifficultyCache.GetDifficultyRating(EditorBeatmap.BeatmapInfo.StarRating);
InterpretedDifficulty.SetDefault(); InterpretedDifficulty.SetDefault();
IssueList = new IssueList();
Child = new Container Child = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
@ -48,7 +47,7 @@ namespace osu.Game.Screens.Edit.Verify
{ {
new Drawable[] new Drawable[]
{ {
IssueList, IssueList = new IssueList(),
new IssueSettings(), new IssueSettings(),
}, },
} }