Skip to main content

LoginAndRegisterHelper

An internal abstract class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal base for client login and registration forms: holds the username and password fields and runs one submit at a time with a loading indicator.

Constructors​

MemberWhat it is
protected LoginAndRegisterHelper()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
protected TextRenderer genericErrorTextText that shows form errors.
protected InputField passwordInputPassword field.
protected InputField usernameInputUsername field.
1 private and internal field
MemberWhat it is
private GameObject loadingObjectObject shown while a submit is running.

Properties​

MemberWhat it is
protected bool IsProcessing { get; set; }Shared busy flag (LoginScreenManager.IsProcessing); setting it also shows or hides the loading object.

Methods​

MemberWhat it is
virtual void OnDisable()Clears the error text and releases the UI action lock.
async void Submit()Runs InternalSubmit unless already busy or the UI is locked, clearing errors and showing loading meanwhile.
protected abstract Task InternalSubmit()The form's actual submit work, written by each subclass.