private void OnChangePassword(HUDTextButton sender, HUDButtonEventArgs e) { if (editPassword.Text == "") { editPassword.AddHUDOperation(new HUDTextBoxBlinkOperation(Color.Red)); return; } if (MainGame.Inst.Profile.AccountType != AccountType.Full) { return; } var waitDialog = new HUDIconMessageBox { L10NText = L10NImpl.STR_CPP_CHANGING, TextColor = FlatColors.TextHUD, Background = HUDBackgroundDefinition.CreateRounded(FlatColors.BelizeHole, 16), IconColor = FlatColors.Clouds, Icon = Textures.CannonCogBig, RotationSpeed = 1f, CloseOnClick = false, }; HUD.AddModal(waitDialog, false, 0.7f); DoChangePassword(waitDialog, editPassword.Text).RunAsync(); }
private void OnLogin(HUDTextButton sender, HUDButtonEventArgs e) { if (editUsername.Text == "") { editUsername.AddHUDOperation(new HUDTextBoxBlinkOperation(Color.Red)); return; } if (editPassword.Text == "") { editPassword.AddHUDOperation(new HUDTextBoxBlinkOperation(Color.Red)); return; } var waitDialog = new HUDIconMessageBox { L10NText = L10NImpl.STR_AAP_LOGGINGIN, TextColor = FlatColors.TextHUD, Background = HUDBackgroundDefinition.CreateRounded(FlatColors.BelizeHole, 16), IconColor = FlatColors.Clouds, Icon = Textures.CannonCogBig, RotationSpeed = 1f, CloseOnClick = false, }; HUD.AddModal(waitDialog, false, 0.7f); DoLogin(waitDialog, editUsername.Text, editPassword.Text).RunAsync(); }