Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- : void ULogin::Login()
- {
- FString username = T_Username->GetText().ToString();
- FString password= T_PASSWORD->GetText().ToString();
- if (username.IsEmpty() & password.IsEmpty()) {
- MessageBoxA(NULL, "Username and Password Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
- return;
- }
- else if (username.IsEmpty()) {
- MessageBoxA(NULL, "Username Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
- return;
- }
- else if (password.IsEmpty()) {
- MessageBoxA(NULL, "Password Can´t be Empty", "Login", MB_OK | MB_SYSTEMMODAL);
- return;
- }
- else {
- GameSparks::Core::GS& gs = UGameSparksModule::GetModulePtr()->GetGSInstance();
- GameSparks::Api::Requests::AuthenticationRequest authRequest(gs);
- authRequest.SetUserName(std::string(TCHAR_TO_UTF8(username)));
- authRequest.SetPassword(std::string(TCHAR_TO_UTF8(password)));
- authRequest.Send(AuthenticationRequest_Response);
- }
- }(editado)
Add Comment
Please, Sign In to add comment