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:
sh0ckR6
2021-09-07 20:05:24 -04:00
parent b8a1ebb786
commit b1f91596a7
2 changed files with 40 additions and 14 deletions

View File

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