mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:33:02 +08:00
adjust colourbar to position itself in a more simple fashion
This commit is contained in:
parent
680646d3a6
commit
92a755c5da
@ -117,13 +117,16 @@ namespace osu.Game.Screens.Select.FooterV2
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre
|
||||
},
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
// The X offset has to multiplied as such to account for the fact that we only want to offset by the distance from the CenterLeft point of the container
|
||||
// not the whole shear width
|
||||
Position = new Vector2(-SHEAR.X * (button_height / 2 - 10), -10),
|
||||
Shear = -SHEAR,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.Centre,
|
||||
Y = -10,
|
||||
Size = new Vector2(120, 6),
|
||||
Masking = true,
|
||||
CornerRadius = 3,
|
||||
@ -132,8 +135,6 @@ namespace osu.Game.Screens.Select.FooterV2
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -153,20 +154,10 @@ namespace osu.Game.Screens.Select.FooterV2
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
updateDisplay();
|
||||
}
|
||||
protected override void OnHoverLost(HoverLostEvent e) => updateDisplay();
|
||||
|
||||
protected override bool OnMouseDown(MouseDownEvent e)
|
||||
{
|
||||
return !Enabled.Value || base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
return !Enabled.Value || base.OnClick(e);
|
||||
}
|
||||
protected override bool OnMouseDown(MouseDownEvent e) => !Enabled.Value || base.OnMouseDown(e);
|
||||
protected override bool OnClick(ClickEvent e) => !Enabled.Value || base.OnClick(e);
|
||||
|
||||
public virtual bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user