예제 #1
0
파일: MenuCursor.cs 프로젝트: Catzzye/osu
 protected override void PopOut()
 {
     ActiveCursor.FadeTo(0, 1400, EasingTypes.OutQuint);
     ActiveCursor.ScaleTo(1.1f, 100, EasingTypes.Out);
     ActiveCursor.Delay(100);
     ActiveCursor.ScaleTo(0, 500, EasingTypes.In);
 }
예제 #2
0
 protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
 {
     if (!state.Mouse.HasMainButtonPressed)
     {
         ActiveCursor.ScaleTo(1, 200, EasingTypes.OutQuad);
     }
     return(base.OnMouseUp(state, args));
 }
예제 #3
0
파일: MenuCursor.cs 프로젝트: Catzzye/osu
        protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
        {
            ActiveCursor.Scale = new Vector2(1);
            ActiveCursor.ScaleTo(0.90f, 800, EasingTypes.OutQuint);

            ((Cursor)ActiveCursor).AdditiveLayer.Alpha = 0;
            ((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, EasingTypes.OutQuint);
            return(base.OnMouseDown(state, args));
        }
예제 #4
0
        protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
        {
            if (!state.Mouse.HasMainButtonPressed)
            {
                ((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, EasingTypes.OutQuint);
                ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), EasingTypes.OutElasticHalf);
                ActiveCursor.ScaleTo(1, 500, EasingTypes.OutElastic);
            }

            return(base.OnMouseUp(state, args));
        }
예제 #5
0
        public bool OnPressed(OsuAction action)
        {
            switch (action)
            {
            case OsuAction.LeftButton:
            case OsuAction.RightButton:
                downCount++;
                ActiveCursor.ScaleTo(1).ScaleTo(1.2f, 100, Easing.OutQuad);
                break;
            }

            return(false);
        }
예제 #6
0
        public bool OnReleased(OsuAction action)
        {
            switch (action)
            {
            case OsuAction.LeftButton:
            case OsuAction.RightButton:
                if (--downCount == 0)
                {
                    ActiveCursor.ScaleTo(1, 200, Easing.OutQuad);
                }
                break;
            }

            return(false);
        }
예제 #7
0
        protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
        {
            ActiveCursor.Scale = new Vector2(1);
            ActiveCursor.ScaleTo(0.90f, 800, Easing.OutQuint);

            ((Cursor)ActiveCursor).AdditiveLayer.Alpha = 0;
            ((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);

            if (args.Button == MouseButton.Left && cursorRotate)
            {
                dragRotationState = DragRotationState.DragStarted;
                positionMouseDown = state.Mouse.Position;
            }
            return(base.OnMouseDown(state, args));
        }
예제 #8
0
        private void calculateScale()
        {
            float scale = userCursorScale.Value;

            if (autoCursorScale.Value && beatmap != null)
            {
                // if we have a beatmap available, let's get its circle size to figure out an automatic cursor scale modifier.
                scale *= GetScaleForCircleSize(beatmap.BeatmapInfo.BaseDifficulty.CircleSize);
            }

            CursorScale.Value = scale;

            var newScale = new Vector2(scale);

            ActiveCursor.ScaleTo(newScale, 400, Easing.OutQuint);
            cursorTrail.Scale = newScale;
        }
예제 #9
0
        protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
        {
            if (!state.Mouse.HasMainButtonPressed)
            {
                ((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, Easing.OutQuint);
                ActiveCursor.ScaleTo(1, 500, Easing.OutElastic);
            }

            if (args.Button == MouseButton.Left)
            {
                if (dragRotationState == DragRotationState.Rotating)
                {
                    ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), Easing.OutElasticHalf);
                }
                dragRotationState = DragRotationState.NotDragging;
            }
            return(base.OnMouseUp(state, args));
        }
예제 #10
0
        public override bool HandlePositionalInput => true; // OverlayContainer will set this false when we go hidden, but we always want to receive input.

        protected override void PopIn()
        {
            fadeContainer.FadeTo(1, 300, Easing.OutQuint);
            ActiveCursor.ScaleTo(1, 400, Easing.OutQuint);
        }
예제 #11
0
 protected override void PopOut()
 {
     fadeContainer.FadeTo(0.05f, 450, Easing.OutQuint);
     ActiveCursor.ScaleTo(0.8f, 450, Easing.OutQuint);
 }
예제 #12
0
 protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
 {
     ActiveCursor.Scale = new Vector2(1);
     ActiveCursor.ScaleTo(1.2f, 100, EasingTypes.OutQuad);
     return(base.OnMouseDown(state, args));
 }
예제 #13
0
 protected override void PopOut()
 {
     ActiveCursor.FadeTo(0, 250, Easing.OutQuint);
     ActiveCursor.ScaleTo(0.6f, 250, Easing.In);
 }
예제 #14
0
 protected override void PopIn()
 {
     ActiveCursor.FadeTo(1, 250, Easing.OutQuint);
     ActiveCursor.ScaleTo(1, 400, Easing.OutQuint);
 }
예제 #15
0
파일: MenuCursor.cs 프로젝트: Catzzye/osu
 protected override void PopIn()
 {
     ActiveCursor.FadeTo(1, 250, EasingTypes.OutQuint);
     ActiveCursor.ScaleTo(1, 1000, EasingTypes.OutElastic);
 }
예제 #16
0
 protected override void PopOut()
 {
     ActiveCursor.FadeTo(0, 900, EasingTypes.OutQuint);
     ActiveCursor.ScaleTo(0, 500, EasingTypes.In);
 }