mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 22:19:30 +08:00
Make pause buttons OnClick and not OnMouseDown.
This commit is contained in:
parent
c56478e154
commit
0f72ef7dc2
@ -1,4 +1,3 @@
|
|||||||
using OpenTK;
|
|
||||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
@ -65,7 +64,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
|
|
||||||
public override bool Contains(Vector2 screenSpacePos) => backgroundContainer.Contains(screenSpacePos);
|
public override bool Contains(Vector2 screenSpacePos) => backgroundContainer.Contains(screenSpacePos);
|
||||||
|
|
||||||
protected override bool OnMouseDown(Framework.Input.InputState state, MouseDownEventArgs args)
|
protected override bool OnClick(Framework.Input.InputState state)
|
||||||
{
|
{
|
||||||
didClick = true;
|
didClick = true;
|
||||||
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
|
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
|
||||||
@ -83,8 +82,6 @@ namespace osu.Game.Overlays.Pause
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnClick(Framework.Input.InputState state) => false;
|
|
||||||
|
|
||||||
protected override bool OnHover(Framework.Input.InputState state)
|
protected override bool OnHover(Framework.Input.InputState state)
|
||||||
{
|
{
|
||||||
colourContainer.ResizeTo(new Vector2(hoverWidth, 1f), hoverDuration, EasingTypes.OutElastic);
|
colourContainer.ResizeTo(new Vector2(hoverWidth, 1f), hoverDuration, EasingTypes.OutElastic);
|
||||||
|
Loading…
Reference in New Issue
Block a user