CODE STYLE XD

This commit is contained in:
gabixdev
2017-09-17 01:28:02 +02:00
parent 846838c621
commit a8ada75633

View File

@ -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();
} }