mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:13:21 +08:00
Fix slider ball not always receiving position in time
This commit is contained in:
parent
fc59e6dec5
commit
8f5e769425
@ -6,6 +6,7 @@ using System.Linq;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -14,7 +15,7 @@ using osuTK;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
public class SliderBall : CircularContainer, ISliderProgress
|
public class SliderBall : CircularContainer, ISliderProgress, IRequireHighFrequencyMousePosition
|
||||||
{
|
{
|
||||||
private const float width = 128;
|
private const float width = 128;
|
||||||
|
|
||||||
@ -107,18 +108,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
private Vector2? lastScreenSpaceMousePosition;
|
private Vector2? lastScreenSpaceMousePosition;
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
|
||||||
{
|
|
||||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
|
||||||
return base.OnMouseDown(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseUp(MouseUpEvent e)
|
|
||||||
{
|
|
||||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
|
||||||
return base.OnMouseUp(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
{
|
{
|
||||||
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
lastScreenSpaceMousePosition = e.ScreenSpaceMousePosition;
|
||||||
|
Loading…
Reference in New Issue
Block a user