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