void ULobbyHUD::OnNicknameSubmitButtonClick() { NicknamePopupEntryWidget->SetVisibility(ESlateVisibility::Collapsed); const FString& nickNameText = NicknameEntryTextBox->GetText().ToString(); auto pc = Cast<AMainPlayerController>(GetWorld()->GetFirstPlayerController()); pc->SetNickname(nickNameText); }
void ToxProtocol::RegisterAccount (const QString& name, const QList<QWidget*>& widgets) { const auto detailsPage = qobject_cast<AccRegisterDetailsPage*> (widgets.value (0)); auto acc = new ToxAccount { name, this }; acc->SetNickname (detailsPage->GetNickname ()); SaveAccount (acc); Accounts_ << acc; emit accountAdded (acc); InitConnections (acc); }