1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 08:13:31 +08:00

Reformat again...

This commit is contained in:
gabixdev 2017-09-17 01:44:49 +02:00
parent a33dfbba25
commit 3c00a7cc51

View File

@ -28,14 +28,16 @@ namespace osu.Game.Graphics.Cursor
protected override bool OnMouseMove(InputState state)
{
if (cursorRotate && 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,
// else it can have an annoying effect.
startRotation |= Vector2Extensions.Distance(state.Mouse.Position, state.Mouse.PositionMouseDown.Value) > 30;
if (startRotation) {
if (startRotation)
{
Vector2 offset = state.Mouse.Position - state.Mouse.PositionMouseDown.Value;
float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f;
@ -72,7 +74,8 @@ namespace osu.Game.Graphics.Cursor
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
if (!state.Mouse.HasMainButtonPressed) {
if (!state.Mouse.HasMainButtonPressed)
{
dragging = false;
startRotation = false;
@ -126,14 +129,19 @@ namespace osu.Game.Graphics.Cursor
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, TextureStore textures, OsuColour colour)
{
Children = new Drawable[] {
cursorContainer = new Container {
Children = new Drawable[]
{
cursorContainer = new Container
{
AutoSizeAxes = Axes.Both,
Children = new Drawable[] {
new Sprite {
Children = new Drawable[]
{
new Sprite
{
Texture = textures.Get(@"Cursor/menu-cursor"),
},
AdditiveLayer = new Sprite {
AdditiveLayer = new Sprite
{
Blending = BlendingMode.Additive,
Colour = colour.Pink,
Alpha = 0,