//------------------------------------------------------------------------------------------------------------- public static void Hide() { if (m_Popup != null) { m_Popup.ForceClose(); } }
void DelayedShow() { SyncSlots(); UpdateAllViews(); UpdateOutfitView(true); GuiEquipSelection.Instance.UpdateScroller(); //TODO_DT: integrovat do GuiEquipMenu! //GuiEquipSelection uz by nemel byt singleton a nejspis by nemusel byt ani samostatna trida. Touch na Equip slotech by mel primarne take chodit do Equip menu a ne do EquipSlots, kod by se tak mohl vyrazne zjednodusit. ShopItemId lastItem = GuiEquipSelection.Instance.LastSelectedItem; if (IsSlotLocked(SelectedSlotType, SelectedSlotIndex)) { SelectedSlotType = GuiShop.E_ItemType.Weapon; SelectedSlotIndex = 0; } SelectSlot(SelectedSlotType, SelectedSlotIndex); if (lastItem != ShopItemId.EmptyId) { GuiEquipSelection.Instance.SelectItem(lastItem); } //Flurry.logEvent(AnalyticsTag.Equip, true); if (m_MessageBox != null) { m_MessageBox.ForceClose(); m_MessageBox = null; } FixEquipList(); }
void HideMessage() { if (m_MessageBox != null) { m_MessageBox.ForceClose(); m_MessageBox = null; } }
static void OnConnectToServerFailed(uLink.NetworkConnectionError reason) { if (JoiningMessageBox != null) { JoiningMessageBox.ForceClose(); JoiningMessageBox = null; } ShowMessageBox("Network error", "Unable to join server (" + reason + ")", GoToMainMenu); }
IEnumerator PasswordRecoveryRequest_Coroutine() { if (string.IsNullOrEmpty(m_UserName) == true) { yield break; } string username = m_UserName; IViewOwner owner = Owner; owner.Back(); GuiPopupMessageBox popup = (GuiPopupMessageBox)owner.ShowPopup("MessageBox", TextDatabase.instance[0103044], TextDatabase.instance[0103043]); popup.SetButtonVisible(false); yield return(new WaitForSeconds(0.2f)); string primaryKey; { UserGetPrimaryKey action = new UserGetPrimaryKey(username); GameCloudManager.AddAction(action); while (action.isDone == false) { yield return(new WaitForEndOfFrame()); } primaryKey = action.primaryKey; } E_PopupResultCode result; { ForgotPassword action = new ForgotPassword(primaryKey); GameCloudManager.AddAction(action); while (action.isDone == false) { yield return(new WaitForEndOfFrame()); } result = action.isSucceeded == true ? E_PopupResultCode.Ok : E_PopupResultCode.Failed; } popup.ForceClose(); SendResult(result); }
IEnumerator AddNewFriend_Coroutine() { string username = Username; string primaryKey = PrimaryKey; string nickname = Nickname; string message = Message; IViewOwner owner = Owner; owner.Back(); GuiPopupMessageBox popup = (GuiPopupMessageBox)owner.ShowPopup("MessageBox", TextDatabase.instance[02040204], TextDatabase.instance[00103043]); popup.SetButtonVisible(false); yield return(new WaitForSeconds(0.2f)); if (string.IsNullOrEmpty(primaryKey) == true) { UserGetPrimaryKey action = new UserGetPrimaryKey(username); GameCloudManager.AddAction(action); while (action.isDone == false) { yield return(new WaitForEndOfFrame()); } primaryKey = action.primaryKey; } GameCloudManager.friendList.AddNewFriend(primaryKey, username, nickname, message); popup.ForceClose(); SendResult(E_PopupResultCode.Ok); }
IEnumerator Login_Coroutine() { GuiPopupMessageBox msgBox = Owner.ShowPopup("MessageBox", TextDatabase.instance[02040016], TextDatabase.instance[02040017]) as GuiPopupMessageBox; // get primary key string primaryKey; { UserGetPrimaryKey action = new UserGetPrimaryKey(m_UserName); GameCloudManager.AddAction(action); while (action.isDone == false) { yield return(new WaitForEndOfFrame()); } primaryKey = action.primaryKey; } #if UNITY_IPHONE || TEST_IOS_VENDOR_ID if (string.IsNullOrEmpty(m_UserName) == false && m_UserName.StartsWith("guest") == true) { string userid = SysUtils.GetUniqueDeviceID(); string vendorID = null; while (string.IsNullOrEmpty(vendorID) == true) { vendorID = MFNativeUtils.IOS.VendorId; yield return(new WaitForEndOfFrame()); } string id = string.IsNullOrEmpty(userid) ? vendorID : userid; string idtype = string.IsNullOrEmpty(userid) ? CloudServices.LINK_ID_TYPE_IOSVENDOR : CloudServices.LINK_ID_TYPE_DEVICE; //Debug.Log(">>>> ID="+id+", IDType="+idtype); GetPrimaryKeyLinkedWithID action = new GetPrimaryKeyLinkedWithID(E_UserAcctKind.Guest, id, idtype); GameCloudManager.AddAction(action); while (action.isDone == false) { yield return(new WaitForEndOfFrame()); } msgBox.ForceClose(); //Debug.Log(">>>> action.isSucceeded="+action.isSucceeded+", action.primaryKey="+action.primaryKey+", primaryKey="+primaryKey); bool force = action.isFailed == true || action.isPrimaryKeyForSHDZ == false || action.primaryKey != primaryKey; bool migrate = false; GuiPopupMigrateGuest migratePopup = (GuiPopupMigrateGuest)Owner.ShowPopup("MigrateGuest", null, null, (inPopup, inResult) => { migrate = inResult == E_PopupResultCode.Ok; }); migratePopup.Usage = force ? GuiPopupMigrateGuest.E_Usage.QuickPlay : GuiPopupMigrateGuest.E_Usage.LoginScreen; migratePopup.PrimaryKey = primaryKey; migratePopup.Password = m_PasswordHash; while (migratePopup.IsVisible == true) { yield return(new WaitForEndOfFrame()); } if (migrate == true) { yield break; } } #endif if (msgBox.IsVisible == true) { msgBox.ForceClose(); } CloudUser cloudUser = CloudUser.instance; cloudUser.SetLoginData(primaryKey, m_UserName, m_UserName, m_PasswordHash, m_PasswordLength, m_RememberMe, m_AutoLogin); CloudUser.instance.AuthenticateLocalUser(); Owner.ShowPopup("Authentication", TextDatabase.instance[02040016], "", AuthenticationResultHandler); // Invoke("AuthenticationDeadLoopFixer", 20); // TODO disable Login screen. }