11 string m_sPasswordNotMatching =
"Passwords do not match";
13 ref ScriptInvoker m_OnDialogClosed =
new ScriptInvoker();
16 override void OnMenuOpen()
22 m_UserName.m_OnChanged.Insert(CheckFilledEditboxes);
26 m_Password.m_OnChanged.Insert(CheckFilledEditboxes);
29 if (m_ConfirmPassword)
30 m_ConfirmPassword.m_OnChanged.Insert(CheckFilledEditboxes);
32 m_Confirm.SetEnabled(
false,
false);
36 override void OnMenuClose()
39 ShowLoadinAnim(
false);
40 m_OnDialogClosed.Invoke();
44 override protected void OnConfirm()
46 if (m_Password.GetValue() != m_ConfirmPassword.GetValue())
48 ShowResponse(m_sPasswordNotMatching, Color.FromInt(
UIColors.WARNING.PackToInt()));
56 override void OnCancel()
63 private void ShowResponse(
string name, Color color)
69 private void CheckFilledEditboxes()
71 bool enabled = m_UserName.GetValue() !=
string.Empty
72 && m_Password.GetValue() !=
string.Empty
73 && m_ConfirmPassword.GetValue() !=
string.Empty;
74 m_Confirm.SetEnabled(enabled);
80 GetGame().GetCallqueue().CallLater(CloseAnimated, m_iDelayMs);
84 void ShowLoadinAnim(
bool show)