mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 06:57:19 +08:00
CODE STYLE XD
This commit is contained in:
parent
846838c621
commit
a8ada75633
@ -21,7 +21,6 @@ namespace osu.Game.Graphics.Cursor
|
||||
protected override Drawable CreateCursor() => new Cursor();
|
||||
|
||||
private Bindable<bool> cursorRotate;
|
||||
private bool dragRotating;
|
||||
|
||||
private bool dragging;
|
||||
|
||||
@ -29,8 +28,8 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
if (dragRotating) {
|
||||
if (dragging) {
|
||||
if (cursorRotate && dragging)
|
||||
{
|
||||
Debug.Assert (state.Mouse.PositionMouseDown != null);
|
||||
|
||||
// don't start rotating until we're moved a minimum distance away from the mouse down location,
|
||||
@ -52,7 +51,6 @@ namespace osu.Game.Graphics.Cursor
|
||||
ActiveCursor.RotateTo (degrees, 600, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnMouseMove(state);
|
||||
}
|
||||
@ -108,10 +106,9 @@ namespace osu.Game.Graphics.Cursor
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, TextureStore textures, OsuColour colour)
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
cursorRotate = config.GetBindable<bool> (OsuSetting.CursorRotation);
|
||||
cursorRotate.ValueChanged += newValue => dragRotating = newValue;
|
||||
cursorRotate.TriggerChange();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user