Make password mask characters look better.

This commit is contained in:
Dean Herbert
2017-02-08 12:41:23 +09:00
parent 5a89ba1040
commit 84096b146e
3 changed files with 39 additions and 9 deletions

View File

@ -8,7 +8,6 @@ using osu.Framework.Input;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using OpenTK.Graphics;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface
{
@ -47,13 +46,6 @@ namespace osu.Game.Graphics.UserInterface
base.OnFocusLost(state);
}
protected override SpriteText GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString() };
}
public class OsuPasswordTextBox : OsuTextBox
{
protected virtual char MaskCharacter => '*';
protected override Drawable AddCharacterToFlow(char c) => base.AddCharacterToFlow(MaskCharacter);
protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize };
}
}