mirror of
https://github.com/ppy/osu
synced 2025-03-19 09:34:49 +00:00
Remove the parentSizedBox
This commit is contained in:
parent
8688d63a9e
commit
6bb5210c7c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user