public void OnClickTopButton(int num) { switch ((POPUP_STATE)num) { case POPUP_STATE.AccountInfo: { if (UserDataManager.Inst.GetUserInfo() == null) { CSVData.Inst.InitCSVData(); return; } else { if (AccountInfoPage.checkInst()) { DebugLog.Log(false, "running Account Info Page"); } else { SetTextBackButton("Account Info"); GameObject objAccountInfoPage = Instantiate(Resources.Load("UI/Lobby/AccountInfoPage")) as GameObject; objAccountInfoPage.transform.SetParent(upperUI.transform); objAccountInfoPage.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; } } } break; case POPUP_STATE.Mail: { if (MailInfoPage.checkInst()) { DebugLog.Log(false, "running Mail Info Page"); } else { GameObject objMailInfoPage = Instantiate(Resources.Load("UI/Lobby/MailInfoPage")) as GameObject; objMailInfoPage.transform.SetParent(upperUI.transform); objMailInfoPage.GetComponent <RectTransform>().anchoredPosition = new Vector2(0, -45); #if UNITY_EDITOR Cheat.Inst.RequestMailListCheat(); #else PacketManager.Inst.RequestMailList(1); #endif } } break; case POPUP_STATE.Setting: { GameObject objSetting = Instantiate(Resources.Load("UI/Lobby/Setting")) as GameObject; objSetting.transform.SetParent(upperUI.transform); objSetting.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; } break; case POPUP_STATE.PVP: { SetImageIconBackButton((POPUP_STATE)num); SetTextBackButton("PVP"); objSubView = Instantiate(Resources.Load("UI/Lobby/PVPInfoPage")) as GameObject; objSubView.transform.SetParent(this.transform); objSubView.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; BackbuttonUI.SetActive(true); } break; default: return; } }