Fix post-merge issues

This commit is contained in:
smoogipoo 2018-02-22 14:22:04 +09:00
parent 99e9eb81f2
commit 07252254eb
2 changed files with 14 additions and 4 deletions

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using OpenTK; using OpenTK;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Layers.Selection; using osu.Game.Rulesets.Edit.Layers.Selection;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
@ -51,14 +50,17 @@ namespace osu.Game.Rulesets.Edit
return; return;
} }
ScalableContainer createLayerContainerWithContent(Drawable content) ScalableContainer createLayerContainerWithContent(params Drawable[] content)
{ {
var container = CreateLayerContainer(); var container = CreateLayerContainer();
container.Child = content; container.Children = content;
layerContainers.Add(container); layerContainers.Add(container);
return container; return container;
} }
HitObjectOverlayLayer hitObjectOverlayLayer;
SelectionLayer selectionLayer;
RadioButtonCollection toolboxCollection; RadioButtonCollection toolboxCollection;
InternalChild = new GridContainer InternalChild = new GridContainer
{ {
@ -93,7 +95,11 @@ namespace osu.Game.Rulesets.Edit
Child = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0, AlwaysPresent = true } Child = new Box { RelativeSizeAxes = Axes.Both, Alpha = 0, AlwaysPresent = true }
}), }),
rulesetContainer, rulesetContainer,
createLayerContainerWithContent(new SelectionLayer(rulesetContainer.Playfield)) createLayerContainerWithContent
(
hitObjectOverlayLayer = CreateHitObjectOverlayLayer(),
selectionLayer = new SelectionLayer(rulesetContainer.Playfield)
)
} }
} }
}, },
@ -104,6 +110,9 @@ namespace osu.Game.Rulesets.Edit
} }
}; };
selectionLayer.ObjectSelected += hitObjectOverlayLayer.AddOverlay;
selectionLayer.ObjectDeselected += hitObjectOverlayLayer.RemoveOverlay;
toolboxCollection.Items = toolboxCollection.Items =
new[] { new RadioButton("Select", () => setCompositionTool(null)) } new[] { new RadioButton("Select", () => setCompositionTool(null)) }
.Concat( .Concat(