mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 10:53:21 +08:00
Redo the layout of sections based on discord feedback
See https://discord.com/channels/188630481301012481/188630652340404224/1291358770064130140 and everything after.
This commit is contained in:
parent
8a650deab6
commit
99eb26b7d5
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Localisation;
|
||||
@ -31,6 +32,7 @@ using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Edit.Setup;
|
||||
using osu.Game.Screens.Ranking.Statistics;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch
|
||||
{
|
||||
@ -223,10 +225,28 @@ namespace osu.Game.Rulesets.Catch
|
||||
|
||||
public override HitObjectComposer CreateHitObjectComposer() => new CatchHitObjectComposer(this);
|
||||
|
||||
public override IEnumerable<SetupSection> CreateEditorSetupSections() =>
|
||||
public override IEnumerable<Drawable> CreateEditorSetupSections() =>
|
||||
[
|
||||
new MetadataSection(),
|
||||
new DifficultySection(),
|
||||
new ColoursSection(),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(25),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ResourcesSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
new ColoursSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
}
|
||||
},
|
||||
new DesignSection(),
|
||||
];
|
||||
|
||||
public override IBeatmapVerifier CreateBeatmapVerifier() => new CatchBeatmapVerifier();
|
||||
|
@ -419,9 +419,12 @@ namespace osu.Game.Rulesets.Mania
|
||||
return new ManiaFilterCriteria();
|
||||
}
|
||||
|
||||
public override IEnumerable<SetupSection> CreateEditorSetupSections() =>
|
||||
public override IEnumerable<Drawable> CreateEditorSetupSections() =>
|
||||
[
|
||||
new MetadataSection(),
|
||||
new ManiaDifficultySection(),
|
||||
new ResourcesSection(),
|
||||
new DesignSection(),
|
||||
];
|
||||
|
||||
public int GetKeyCount(IBeatmapInfo beatmapInfo, IReadOnlyList<Mod>? mods = null)
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Localisation;
|
||||
@ -39,6 +40,7 @@ using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Edit.Setup;
|
||||
using osu.Game.Screens.Ranking.Statistics;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
@ -336,10 +338,28 @@ namespace osu.Game.Rulesets.Osu
|
||||
};
|
||||
}
|
||||
|
||||
public override IEnumerable<SetupSection> CreateEditorSetupSections() =>
|
||||
public override IEnumerable<Drawable> CreateEditorSetupSections() =>
|
||||
[
|
||||
new MetadataSection(),
|
||||
new OsuDifficultySection(),
|
||||
new ColoursSection(),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(25),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ResourcesSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
new ColoursSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
}
|
||||
},
|
||||
new DesignSection(),
|
||||
];
|
||||
|
||||
/// <seealso cref="OsuHitObject.ApplyDefaultsToSelf"/>
|
||||
|
@ -190,9 +190,12 @@ namespace osu.Game.Rulesets.Taiko
|
||||
|
||||
public override HitObjectComposer CreateHitObjectComposer() => new TaikoHitObjectComposer(this);
|
||||
|
||||
public override IEnumerable<SetupSection> CreateEditorSetupSections() =>
|
||||
public override IEnumerable<Drawable> CreateEditorSetupSections() =>
|
||||
[
|
||||
new MetadataSection(),
|
||||
new TaikoDifficultySection(),
|
||||
new ResourcesSection(),
|
||||
new DesignSection(),
|
||||
];
|
||||
|
||||
public override IBeatmapVerifier CreateBeatmapVerifier() => new TaikoBeatmapVerifier();
|
||||
|
@ -8,6 +8,7 @@ using System.Linq;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Extensions.EnumExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.IO.Stores;
|
||||
@ -30,6 +31,7 @@ using osu.Game.Screens.Edit.Setup;
|
||||
using osu.Game.Screens.Ranking.Statistics;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets
|
||||
{
|
||||
@ -396,10 +398,28 @@ namespace osu.Game.Rulesets
|
||||
/// <summary>
|
||||
/// Can be overridden to add ruleset-specific sections to the editor beatmap setup screen.
|
||||
/// </summary>
|
||||
public virtual IEnumerable<SetupSection> CreateEditorSetupSections() =>
|
||||
public virtual IEnumerable<Drawable> CreateEditorSetupSections() =>
|
||||
[
|
||||
new MetadataSection(),
|
||||
new DifficultySection(),
|
||||
new ColoursSection(),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(25),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ResourcesSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
},
|
||||
new ColoursSection
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
}
|
||||
}
|
||||
},
|
||||
new DesignSection(),
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
|
@ -15,7 +15,7 @@ using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
internal partial class DesignSection : SetupSection
|
||||
public partial class DesignSection : SetupSection
|
||||
{
|
||||
protected FormCheckBox EnableCountdown = null!;
|
||||
|
||||
|
@ -13,7 +13,7 @@ using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
internal partial class ResourcesSection : SetupSection
|
||||
public partial class ResourcesSection : SetupSection
|
||||
{
|
||||
private FormFileSelector audioTrackChooser = null!;
|
||||
private FormFileSelector backgroundChooser = null!;
|
||||
|
@ -65,25 +65,15 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
new FillFlowContainer
|
||||
{
|
||||
Width = 450,
|
||||
Width = 925,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Spacing = new Vector2(25),
|
||||
Children = new Drawable[]
|
||||
ChildrenEnumerable = ruleset.CreateEditorSetupSections().Select(section => section.With(s =>
|
||||
{
|
||||
new ResourcesSection(),
|
||||
new MetadataSection(),
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
Width = 450,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Spacing = new Vector2(25),
|
||||
ChildrenEnumerable = ruleset.CreateEditorSetupSections().Append(new DesignSection()),
|
||||
s.Width = 450;
|
||||
})),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
InternalChild = new FillFlowContainer
|
||||
|
Loading…
Reference in New Issue
Block a user