mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Use ExpandingButtonContainer
in editor composer
This commit is contained in:
@ -13,6 +13,7 @@ using osu.Framework.Input;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets.Configuration;
|
||||
using osu.Game.Rulesets.Edit.Tools;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
@ -98,8 +99,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
|
||||
dependencies.CacheAs(Playfield);
|
||||
|
||||
const float toolbar_width = 200;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
@ -116,20 +115,15 @@ namespace osu.Game.Rulesets.Edit
|
||||
.WithChild(BlueprintContainer = CreateBlueprintContainer())
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
new LeftToolboxFlow
|
||||
{
|
||||
Name = "Sidebar",
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Width = toolbar_width,
|
||||
Padding = new MarginPadding { Right = 10 },
|
||||
Spacing = new Vector2(10),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ToolboxGroup("toolbox (1-9)")
|
||||
new EditorToolboxGroup("toolbox (1-9)")
|
||||
{
|
||||
Child = toolboxCollection = new EditorRadioButtonCollection { RelativeSizeAxes = Axes.X }
|
||||
},
|
||||
new ToolboxGroup("toggles (Q~P)")
|
||||
new EditorToolboxGroup("toggles (Q~P)")
|
||||
{
|
||||
Child = togglesCollection = new FillFlowContainer
|
||||
{
|
||||
@ -426,6 +420,18 @@ 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>
|
||||
|
Reference in New Issue
Block a user