mirror of
https://github.com/ppy/osu.git
synced 2026-06-13 16:44:33 +08:00
Implement a V2 password textbox (#38028)
This PR adds a password input form control consistent with the V2 form controls. Default state: <img width="601" height="90" alt="image" src="https://github.com/user-attachments/assets/f7e49468-8e9f-4a94-9c12-ad445b7cac17" /> Caps Lock active: <img width="598" height="90" alt="image" src="https://github.com/user-attachments/assets/cda4fb67-4803-4e39-9cbd-73f34318ab6f" /> --------- Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
ada19d93a7
commit
3b4dfd5903
@@ -84,6 +84,8 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
private FormFieldCaption caption = null!;
|
||||
private IFocusManager focusManager = null!;
|
||||
|
||||
protected Container CaptionContainer { get; private set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
@@ -104,12 +106,22 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
Spacing = new Vector2(0, 4),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
caption = new FormFieldCaption
|
||||
CaptionContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Caption = Caption,
|
||||
TooltipText = HintText,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
caption = new FormFieldCaption
|
||||
{
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Caption = Caption,
|
||||
TooltipText = HintText,
|
||||
},
|
||||
},
|
||||
},
|
||||
textBox = CreateTextBox().With(t =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user