mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Remove ``onclick
` and
`mousedown
`` override
This commit is contained in:
parent
bc94f1b773
commit
41f5e5143a
@ -80,11 +80,10 @@ namespace osu.Game.Screens.Select.FooterV2
|
|||||||
Size = new Vector2(button_width, button_height);
|
Size = new Vector2(button_width, button_height);
|
||||||
Masking = true;
|
Masking = true;
|
||||||
CornerRadius = corner_radius;
|
CornerRadius = corner_radius;
|
||||||
InternalChildren = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
backgroundBox = new Box
|
backgroundBox = new Box
|
||||||
{
|
{
|
||||||
Colour = colourProvider.Background3,
|
|
||||||
RelativeSizeAxes = Axes.Both
|
RelativeSizeAxes = Axes.Both
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -142,6 +141,9 @@ namespace osu.Game.Screens.Select.FooterV2
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
|
// We want the first colour assignment for the background to be instantaneous
|
||||||
|
backgroundBox.Colour = Enabled.Value ? colourProvider.Background3 : colourProvider.Background3.Darken(0.3f);
|
||||||
|
|
||||||
Enabled.BindValueChanged(_ => updateDisplay(), true);
|
Enabled.BindValueChanged(_ => updateDisplay(), true);
|
||||||
OverlayState.BindValueChanged(_ => updateDisplay());
|
OverlayState.BindValueChanged(_ => updateDisplay());
|
||||||
}
|
}
|
||||||
@ -156,9 +158,6 @@ namespace osu.Game.Screens.Select.FooterV2
|
|||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e) => updateDisplay();
|
protected override void OnHoverLost(HoverLostEvent e) => updateDisplay();
|
||||||
|
|
||||||
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)
|
public virtual bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
if (e.Action != Hotkey || e.Repeat) return false;
|
if (e.Action != Hotkey || e.Repeat) return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user