Also has the bonus feature of allowing password managers (e.g. 1Password) to be integrated with the game, by specifying the text input type as Username/Password in the textboxes. Unfortunately it's still quite broken in SDL but should be fixable (see https://github.com/libsdl-org/SDL/pull/11406#discussion_r1827411417).
Since text input types are now identifiable with the new TextInputType field, I've applied a refactor on the TextBox classes to respect the type at a TextBox level w.r.t. certain functionalities such as clipboard exporting, key event logging, character display, etc. This includes removing BasicPasswordTextBox entirely as its behaviour can be achieved by simply:
new BasicTextBox
{
InputProperties = new TextInputProperties(TextInputType.Password, allowIme: false)
}
I've gone for this refactor as it didn't sit well for me how these implementations still exist while there is now a new field specifying the type of text input.
Also has the bonus feature of allowing password managers (e.g. 1Password) to be integrated with the game, by specifying the text input type as
Username
/Password
in the textboxes. Unfortunately it's still quite broken in SDL but should be fixable (see https://github.com/libsdl-org/SDL/pull/11406#discussion_r1827411417).Since text input types are now identifiable with the new
TextInputType
field, I've applied a refactor on theTextBox
classes to respect the type at aTextBox
level w.r.t. certain functionalities such as clipboard exporting, key event logging, character display, etc. This includes removingBasicPasswordTextBox
entirely as its behaviour can be achieved by simply:I've gone for this refactor as it didn't sit well for me how these implementations still exist while there is now a new field specifying the type of text input.