mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Add more padding around playfield in editor to avoid overlap with tool areas
Closes #23130.
This commit is contained in:
parent
4a97c2c105
commit
67f83f246b
@ -13,8 +13,8 @@ using osu.Framework.Extensions.EnumExtensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Utils;
|
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
@ -62,7 +62,12 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
// Give a bit of breathing room around the playfield content.
|
// Give a bit of breathing room around the playfield content.
|
||||||
PlayfieldContentContainer.Padding = new MarginPadding(10);
|
PlayfieldContentContainer.Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Vertical = 10,
|
||||||
|
Left = TOOLBOX_CONTRACTED_SIZE_LEFT + 10,
|
||||||
|
Right = TOOLBOX_CONTRACTED_SIZE_RIGHT + 10,
|
||||||
|
};
|
||||||
|
|
||||||
LayerBelowRuleset.AddRange(new Drawable[]
|
LayerBelowRuleset.AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -116,6 +116,11 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
PlayfieldContentContainer = new Container
|
PlayfieldContentContainer = new Container
|
||||||
{
|
{
|
||||||
Name = "Content",
|
Name = "Content",
|
||||||
|
Padding = new MarginPadding
|
||||||
|
{
|
||||||
|
Left = TOOLBOX_CONTRACTED_SIZE_LEFT,
|
||||||
|
Right = TOOLBOX_CONTRACTED_SIZE_RIGHT,
|
||||||
|
},
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -138,7 +143,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
Colour = colourProvider.Background5,
|
Colour = colourProvider.Background5,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
LeftToolbox = new ExpandingToolboxContainer(60, 200)
|
LeftToolbox = new ExpandingToolboxContainer(TOOLBOX_CONTRACTED_SIZE_LEFT, 200)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -173,7 +178,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
Colour = colourProvider.Background5,
|
Colour = colourProvider.Background5,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
RightToolbox = new ExpandingToolboxContainer(130, 250)
|
RightToolbox = new ExpandingToolboxContainer(TOOLBOX_CONTRACTED_SIZE_RIGHT, 250)
|
||||||
{
|
{
|
||||||
Child = new EditorToolboxGroup("inspector")
|
Child = new EditorToolboxGroup("inspector")
|
||||||
{
|
{
|
||||||
@ -450,6 +455,9 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
[Cached]
|
[Cached]
|
||||||
public abstract partial class HitObjectComposer : CompositeDrawable, IPositionSnapProvider
|
public abstract partial class HitObjectComposer : CompositeDrawable, IPositionSnapProvider
|
||||||
{
|
{
|
||||||
|
public const float TOOLBOX_CONTRACTED_SIZE_LEFT = 60;
|
||||||
|
public const float TOOLBOX_CONTRACTED_SIZE_RIGHT = 130;
|
||||||
|
|
||||||
public readonly Ruleset Ruleset;
|
public readonly Ruleset Ruleset;
|
||||||
|
|
||||||
protected HitObjectComposer(Ruleset ruleset)
|
protected HitObjectComposer(Ruleset ruleset)
|
||||||
|
Loading…
Reference in New Issue
Block a user