Combine editor toolbox container implementation and fix input blocking

Until now, toolbox scroll areas would block input from arriving behind
them, even when no visible element was clicked.

In addition, clicking on a button inside a toolbox would still send a
`MouseDown` event to things behind it. Specifically, the editor's
`HitObjectComposer` would receive these events and also place objects
when the user does not expect them to be placed.

This fixes another regression that occurred due to `ScrollContainer`s no
longer blocking input theirselves.
This commit is contained in:
Dean Herbert
2022-05-04 17:41:29 +09:00
parent a66743266f
commit b325f0ee0b
3 changed files with 38 additions and 31 deletions

View File

@ -13,7 +13,6 @@ using osu.Framework.Input;
using osu.Framework.Input.Events;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers;
using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Edit.Tools;
using osu.Game.Rulesets.Mods;
@ -115,8 +114,9 @@ namespace osu.Game.Rulesets.Edit
.WithChild(BlueprintContainer = CreateBlueprintContainer())
}
},
new LeftToolboxFlow
new ExpandingToolboxContainer(80, 200)
{
Padding = new MarginPadding { Left = 10 },
Children = new Drawable[]
{
new EditorToolboxGroup("toolbox (1-9)")
@ -382,18 +382,6 @@ namespace osu.Game.Rulesets.Edit
}
#endregion
private class LeftToolboxFlow : ExpandingButtonContainer
{
public LeftToolboxFlow()
: base(80, 200)
{
RelativeSizeAxes = Axes.Y;
Padding = new MarginPadding { Right = 10 };
FillFlow.Spacing = new Vector2(10);
}
}
}
/// <summary>