mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Give user feedback on password attempt fail
Shake the popover Set the input box's color to red and set the placeholder text to "incorrect password"
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
@ -26,6 +27,11 @@ namespace osu.Game.Graphics.Containers
|
||||
/// </summary>
|
||||
public float ShakeMagnitude = 8;
|
||||
|
||||
/// <summary>
|
||||
/// Fired when <see cref="Shake"/> finishes
|
||||
/// </summary>
|
||||
public event Action OnShakeFinish;
|
||||
|
||||
/// <summary>
|
||||
/// Shake the contents of this container.
|
||||
/// </summary>
|
||||
@ -50,6 +56,7 @@ namespace osu.Game.Graphics.Containers
|
||||
}
|
||||
|
||||
sequence.MoveToX(0, ShakeDuration / 2, Easing.InSine);
|
||||
sequence.Finally(_ => OnShakeFinish?.Invoke());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user