1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00

Remove the parentSizedBox

This commit is contained in:
smoogipoo 2017-09-29 15:09:28 +09:00
parent 8688d63a9e
commit 6bb5210c7c

View File

@ -44,27 +44,12 @@ namespace osu.Game.Screens.Edit.Menus
private Color4 openedForegroundColour;
private Color4 openedBackgroundColour;
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => parentSizedBox.ReceiveMouseInputAt(screenSpacePos);
/// <summary>
/// A box with width equal to this <see cref="DrawableEditorBarMenuItem"/>'s width, and height equal to the parent height.
/// </summary>
private readonly Box parentSizedBox;
public DrawableEditorBarMenuItem(MenuItem item)
: base(item)
{
Anchor = Anchor.CentreLeft;
Origin = Anchor.CentreLeft;
AddInternal(parentSizedBox = new Box
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
BypassAutoSizeAxes = Axes.Both,
Alpha = 0,
});
}
public override void SetFlowDirection(Direction direction)
@ -100,8 +85,6 @@ namespace osu.Game.Screens.Edit.Menus
protected override void Update()
{
base.Update();
parentSizedBox.Height = Parent.DrawHeight;
}
protected override Drawable CreateBackground() => new Container