public override bool DoDialog() { bool result = false; GUI.depth = 0; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); string text = StringMgr.Instance.Get("WAITING_QUEUING") + " " + waiting.ToString(); LabelUtil.TextOut(new Vector2((float)(Screen.width / 2), msgY), text, "BigLabel", Color.gray, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); if (GlobalVars.Instance.MyButton(new Rect(((float)Screen.width - sizeOk.x) / 2f, size.y - sizeOk.y - 25f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("CANCEL"), "BtnAction")) { GameObject gameObject = GameObject.Find("Main"); if (null != gameObject) { gameObject.BroadcastMessage("OnLoginFail"); } CSNetManager.Instance.Clear(); result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); toggle.Draw(); ok.Draw(); if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_ESCAPE_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); successRotate.Draw(); successEffect.Draw(); background.BeginGroup(); imgList.Draw(); labelList.Draw(); itemName.Draw(); itemBackNomal.Draw(); itemBackRare.Draw(); itemIcon.Draw(); itemTime.Draw(); property.DoPropertyGuage(85f); itemExplain.Draw(); if (exit.Draw() || ok.Draw() || GlobalVars.Instance.IsReturnPressed()) { result = true; } background.EndGroup(); if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { premiumAccount = (MyInfoManager.Instance.HaveFunction("premium_account") >= 0); bool flag = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); DoWeaponSlots(); Rect rc = new Rect(size.x - 44f, 10f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { flag = true; GlobalVars.Instance.SetForceClosed(set: true); } if (ZombieVsHumanManager.Instance.IsZombie(MyInfoManager.Instance.Seq)) { flag = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(flag || done); }
public override bool DoDialog() { CalcSize(); bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); LabelUtil.TextOut(new Vector2(size.x / 2f, crdLeftTop.y / 2f), StringMgr.Instance.Get("KICKOFF"), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); Vector2 vector = crdLeftTop; BrickManDesc[] array = BrickManManager.Instance.ToDescriptorArrayWhoTookTooLongToWait(); if (array.Length <= 0) { result = true; } for (int i = 0; i < array.Length; i++) { if (GlobalVars.Instance.MyButton(new Rect(vector.x + crdXLT.x, vector.y + crdXLT.y, crdX.x, crdX.y), string.Empty, "X")) { CSNetManager.Instance.Sock.SendCS_KICK_REQ(array[i].Seq); } LabelUtil.TextOut(new Vector2(vector.x + crdNickname.x, vector.y + crdNickname.y), array[i].Nickname, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); vector.y += offset; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); reloadText.Draw(); mouseText.Draw(); toggle.Draw(); ok.Draw(); if (BuildOption.Instance.Props.useDefaultDash) { speedUpText.Draw(); } if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_BATTLE_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Rect position = new Rect(16f, 12f, 774f, 38f); GUI.Box(position, string.Empty, "BoxFadeBlue"); TextureUtil.DrawTexture(new Rect(33f, 16f, (float)iconHelp.width, (float)iconHelp.height), iconHelp); LabelUtil.TextOut(new Vector2(80f, 30f), mainHeads[GlobalVars.Instance.opened], "MissionTitleLabel", clrMain, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); float num = calcBoxHeight(articleID); Rect position2 = new Rect(16f, 63f, 764f, num); GUI.Box(position2, string.Empty, "LineBoxBlue"); TextureUtil.DrawTexture(new Rect(35f, 79f, (float)iconPoint.width, (float)iconPoint.height), iconPoint); LabelUtil.TextOut(new Vector2(55f, 81f), subHeads[articleID], "MissionTitleLabel", clrMain, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); GUI.Label(new Rect(position2.x + 20f, position2.y + articley, 720f, 60f), strArticle, "ArticleLabel"); TextureUtil.DrawTexture(new Rect(45f, position2.y + num + 10f, (float)tutos[articleID].width, (float)tutos[articleID].height), tutos[articleID]); if (endsPerPage[GlobalVars.Instance.opened] > 0 && subPage < endsPerPage[GlobalVars.Instance.opened] - 1) { Rect rc = new Rect(size.x - 160f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("BTN_NEXT"), "BtnAction")) { subPage++; articleID++; } } else { Rect rc2 = new Rect(size.x - 160f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc2, StringMgr.Instance.Get("OK"), "BtnAction") || GlobalVars.Instance.IsEscapePressed() || GlobalVars.Instance.IsReturnPressed()) { GlobalVars.Instance.SetForceClosed(set: true); result = true; } } if (endsPerPage[GlobalVars.Instance.opened] > 0 && subPage > 0) { Rect rc3 = new Rect(20f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc3, StringMgr.Instance.Get("BTN_PREVIOUS"), "BtnAction")) { subPage--; articleID--; } } Rect rc4 = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc4, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { GlobalVars.Instance.resetMenuEx(); result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { premiumAccount = (MyInfoManager.Instance.HaveFunction("premium_account") >= 0); bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Rect position = new Rect((GlobalVars.Instance.ScreenRect.width - size.x) / 2f, (GlobalVars.Instance.ScreenRect.height - size.y) / 2f, size.x, size.y); GUI.Box(position, string.Empty, "Window"); GUI.BeginGroup(position); DoTitle(); if (GlobalVars.Instance.MyButton(crdX, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } DoItems(); DoButtons(); DoTooltip(new Vector2(position.x, position.y)); GUI.EndGroup(); if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool flag = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 15f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("LANGUAGE_SELECT"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); Vector2 vector = crdLeftTop; int num = 0; while (!flag && num < langTex.Length) { if (GUI.Button(new Rect(vector.x, vector.y, crdButtonSize.x, crdButtonSize.y), langTex[num], "BtnBlue")) { flag = true; if (LangOptManager.Instance.LangOpt != (int)languages[num]) { LangOptManager.Instance.LangOpt = (int)languages[num]; GUISkinFinder.Instance.LanguageChanged(); GlobalVars.Instance.LoadAbg(); GlobalVars.Instance.ChangeVoiceByLang(LangOptManager.Instance.LangOpt); } } vector.y += crdButtonSize.y + offset; num++; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(flag); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); if (GlobalVars.Instance.isLoadBattleTutor) { GUI.Label(new Rect(0f, 10f, size.x, size.y - sizeOk.y - 20f), StringMgr.Instance.Get("TUTORIAL_COMPLETE"), "MsgLabel"); } else { GUI.Label(new Rect(0f, 10f, size.x, size.y - sizeOk.y - 20f), StringMgr.Instance.Get("TUTORIAL_COMPLETE2"), "MsgLabel"); } if (GlobalVars.Instance.MyButton(new Rect((GlobalVars.Instance.ScreenRect.width - sizeOk.x) / 2f, size.y - sizeOk.y - 10f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("OK"), "BtnAction")) { if (MyInfoManager.Instance.Tutorialed < 2) { DialogManager.Instance.Push(DialogManager.DIALOG_INDEX.TUTOR_Q_POPUP, string.Empty); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); if (exit.Draw()) { result = true; } scrollView.SetListCount(benefitList.Count); scrollView.BeginScroll(); for (int i = 0; i < benefitList.Count; i++) { itemIcon.texImage = benefitList[i].texImage; itemText.textKey = benefitList[i].textKey; scrollView.SetListPostion(i); scrollView.Draw(); } scrollView.EndScroll(); if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("CHG_REPLACE_DST"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); DoSilo(); if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction")) { if (replaceToolDlg.Prev.seq == currentBrick.seq) { SystemMsgManager.Instance.ShowMessage(StringMgr.Instance.Get("CAN_NOT_REPLACE_SAME_BRICK")); } else { replaceToolDlg.Next = currentBrick; result = true; } } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); toggle.Draw(); ok.Draw(); string text = string.Format(StringMgr.Instance.Get("GUIDE_EXPLOSION_ATTACK04"), custom_inputs.Instance.GetKeyCodeName("K_MODE"), custom_inputs.Instance.GetKeyCodeName("K_ACTION")); GUI.Label(crdMsg, text, "UpperLeftLabel"); if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_EXPLOSION_ATTACK_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); DoIntro(); if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction") && CheckInput()) { CSNetManager.Instance.Sock.SendCS_CHANGE_CLAN_INTRO_REQ(MyInfoManager.Instance.Seq, intro); result = true; } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); LabelUtil.TextOut(crdTitle, StringMgr.Instance.Get("CONFIRM_BUY"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); ShowPresent(); string str = string.Empty; if (autoChargeConfirm.Length > 0) { str = autoChargeConfirm + " "; } str += string.Format(StringMgr.Instance.Get("ARE_YOU_SURE_PRESENT"), receiver); GUI.Label(crdSure, str, "Label"); if (GlobalVars.Instance.MyButton(crdPresent, StringMgr.Instance.Get("PRESENT"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { CSNetManager.Instance.Sock.SendCS_PRESENT_ITEM_REQ(tItem.code, (int)buyHow, good.GetOption(selected, buyHow), receiver, title, contents); result = true; } if (GlobalVars.Instance.MyButton(crdCloseBtn, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); GUI.Box(crdComment, string.Empty, "BoxPopLine"); if (token <= 0) { GUI.Label(crdCommentLabel, StringMgr.Instance.Get("SURE_USE_TREASURE_CHEST_BY_COIN"), "MiddleCenterLabel"); } else { GUI.Label(crdCommentLabel, string.Format(StringMgr.Instance.Get("SURE_USE_TREASURE_CHEST_BY_TOKEN"), token, TokenManager.Instance.GetTokenString()), "MiddleCenterLabel"); } if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction")) { CSNetManager.Instance.Sock.SendCS_TC_OPEN_PRIZE_TAG_REQ(chest, index, token <= 0); result = true; } if (GlobalVars.Instance.MyButton(crdCancel, StringMgr.Instance.Get("CANCEL"), "BtnAction")) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); mainLabel.Draw(); isExitLabel.Draw(); reciveCount.SetTextFormat(rewardCount, max); reciveCount.Draw(); int num = (int)(Time.realtimeSinceStartup - serverDataSinceTime); int num2 = (resetAfter - num) / 60; int num3 = num2 / 60; num2 %= 60; initializationTime.SetTextFormat(num3, num2); initializationTime.Draw(); currentMyCoin.SetTextFormat(MyInfoManager.Instance.FreeCoin); currentMyCoin.Draw(); pcbangPlusImage.Draw(); timeGauge.valueNow = (float)(num + playTime); if (rewardCount == max) { timeGauge.valueNow = timeGauge.valueMax; } timeGauge.Draw(); num2 = (cycle - playTime - num) / 60; num3 = num2 / 60; num2 = num2 % 60 + 1; if (num2 <= 0) { num2 = 1; } if (max == rewardCount) { num2 = 0; } remainTime.SetTextFormat(num2.ToString()); remainTime.Draw(); doneStamp.Draw(); explain.SetTextFormat(max); explain.Draw(); if (exit.Draw() || ok.Draw() || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (gameExit.Draw()) { BuildOption.Instance.Exit(); } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoResultEffect(); GUI.BeginGroup(new Rect(((float)Screen.width - tmpSize.x) / 2f, ((float)Screen.height - tmpSize.y) / 2f, tmpSize.x, tmpSize.y)); GUI.Box(new Rect(0f, 0f, tmpSize.x, tmpSize.y), string.Empty, "Window"); GUI.Box(crdOutline, string.Empty, "BoxFadeBlue"); LabelUtil.TextOut(crdText1, StringMgr.Instance.Get("CONGRATULATION"), "Label", new Color(1f, 1f, 1f), GlobalVars.txtEmptyColor, TextAnchor.LowerCenter); string key = resultCode; TItem tItem = TItemManager.Instance.Get <TItem>(key); string optionStringByOption = tItem.GetOptionStringByOption(resultRemain / 86400); string text = string.Format(StringMgr.Instance.Get("TAKE_RANDOM_ITEM"), tItem.Name, optionStringByOption); LabelUtil.TextOut(crdText2, text, "Label", new Color(1f, 1f, 1f), GlobalVars.txtEmptyColor, TextAnchor.LowerCenter); LabelUtil.TextOut(crdText3, StringMgr.Instance.Get("RANDOMBOX_EXP1"), "Label", new Color(1f, 1f, 1f), GlobalVars.txtEmptyColor, TextAnchor.LowerCenter); switch (tItem.type) { case TItem.TYPE.WEAPON: DoWeapon((TWeapon)tItem); break; case TItem.TYPE.CLOTH: DoCostume((TCostume)tItem); break; case TItem.TYPE.ACCESSORY: DoAccessory((TAccessory)tItem); break; case TItem.TYPE.CHARACTER: DoCharacter((TCharacter)tItem); break; } if (tItem.CurIcon() == null) { Debug.LogError("Fail to get icon for item " + tItem.CurIcon()); } else { TextureUtil.DrawTexture(crdIcon, tItem.CurIcon(), ScaleMode.StretchToFill); } LabelUtil.TextOut(crdName, tItem.Name, "Label", new Color(0.73f, 0.44f, 0.26f), GlobalVars.txtEmptyColor, TextAnchor.LowerLeft); LabelUtil.TextOut(crdDuration, optionStringByOption, "Label", new Color(0.93f, 0.55f, 0.33f), GlobalVars.txtEmptyColor, TextAnchor.LowerRight); if (GlobalVars.Instance.MyButton(crdBtnConfirm, StringMgr.Instance.Get("OK"), "BtnAction")) { result = true; } GUI.EndGroup(); if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); DoComment(); DoMainTab(); switch (curMainTab) { case 0: DoBackgrounds(); break; case 1: DoFrames(); break; case 2: DoAmblums(); break; } DoClanMark(); Rect rc = new Rect(size.x - 90f, size.y - 40f, 80f, 34f); int num = ClanMarkManager.Instance.IndexToMark(bg, frame, amblum); if (num != curMark && GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("OK"), "BtnAction")) { TItem specialItem2HaveFunction = TItemManager.Instance.GetSpecialItem2HaveFunction("clan_mark"); if (specialItem2HaveFunction != null) { long num2 = MyInfoManager.Instance.HaveFunction("clan_mark"); if (num2 >= 0) { CSNetManager.Instance.Sock.SendCS_CHANGE_CLAN_MARK_REQ(MyInfoManager.Instance.ClanSeq, num, num2, specialItem2HaveFunction.code); } else { string msg = string.Format(StringMgr.Instance.Get("CLAN_MARK_TICKET_NEED"), specialItem2HaveFunction.Name); MessageBoxMgr.Instance.AddMessage(msg); } } } Rect rc2 = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc2, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); if (text == null || text.Length <= 0) { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY), StringMgr.Instance.Get("ARE_YOU_SURE_BACK"), "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } else if (!isEditor) { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY - 15f), text, "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY + 20f), StringMgr.Instance.Get("ARE_YOU_SURE_BACK"), "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } else { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY), text, "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } if (isEditor) { if (GlobalVars.Instance.MyButton(new Rect(GlobalVars.Instance.ScreenRect.width / 2f - 110f, size.y - sizeOk.y - 25f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("SAVE"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { result = true; GetCopyRight(); ThumbnailToPNG(); CSNetManager.Instance.Sock.SendCS_SAVE_REQ(umi.Slot, ThumbnailToPNG()); BackToScene(); } if (GlobalVars.Instance.MyButton(new Rect(GlobalVars.Instance.ScreenRect.width / 2f + 10f, size.y - sizeOk.y - 25f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("CANCEL"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { MyInfoManager.Instance.IsModified = false; result = true; BackToScene(); } } else if (GlobalVars.Instance.MyButton(new Rect(GlobalVars.Instance.ScreenRect.width / 2f - 50f, size.y - sizeOk.y - 25f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("OK"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { result = true; BackToScene(); } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); if (text.Length <= 0) { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY), StringMgr.Instance.Get("ARE_YOU_SURE_EXIT"), "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } else { Vector2 vector = LabelUtil.CalcSize("BigLabel", text, size.x); Line = (int)(vector.y / 22f); if (Line >= 3) { IsLong = true; } if (!IsLong) { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY - 15f), text, "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY + 10f), StringMgr.Instance.Get("ARE_YOU_SURE_EXIT"), "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } else { LabelUtil.TextOut(new Vector2(GlobalVars.Instance.ScreenRect.width / 2f, msgY), text, "BigLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } } if (GlobalVars.Instance.MyButton(new Rect(GlobalVars.Instance.ScreenRect.width / 2f - 50f, size.y - sizeOk.y - 25f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("OK"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { result = true; if (softExit) { BuildOption.Instance.Exit(); } else { BuildOption.Instance.HardExit(); } } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if ((!closeButtonHide && GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose")) || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("PASSWORD"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); string text = roomPswd; GUI.SetNextControlName("PasswordTextField"); roomPswd = GUI.PasswordField(crdPswd, roomPswd, '*'); if (roomPswd.Length > maxRoomPswd) { roomPswd = text; } if (GlobalVars.Instance.MyButton(new Rect(25f, 87f, 122f, 34f), StringMgr.Instance.Get("OK"), "BtnAction")) { roomPswd.Trim(); if (roomPswd.Length > 0) { if (CSNetManager.Instance.Sock.SendCS_JOIN_REQ(roomNo, roomPswd, invite: false)) { } result = true; } else { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("INPUT_ROOM_PSWD")); } } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } Dialog top = DialogManager.Instance.GetTop(); if (top != null && top.ID == id) { GUI.FocusWindow((int)id); GUI.FocusControl("PasswordTextField"); } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); DoComment(); Rect rc = new Rect(size.x - 115f, size.y - 44f, 100f, 34f); if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("CLAN_CREATE"), "BtnAction")) { if (MyInfoManager.Instance.Point < 30000) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("NOT_ENOUGH_MONEY4CREATE_CLAN")); } else if (MyInfoManager.Instance.ClanSeq >= 0) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("CLAN_MEMBER_CANT_CREATE_CLAN")); } else if (!clanNameIsAvailable) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("CHECK_NAME_AVAILABILITY")); } else if (availableName != clanName) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("CHECK_NAME_AVAILABILITY")); } else { CSNetManager.Instance.Sock.SendCS_CREATE_CLAN_REQ(clanName); result = true; } } string text = StringMgr.Instance.Get("CLAN_CREATE_POINT") + " : 30000"; string text2 = StringMgr.Instance.Get("MYPOINT") + " : " + MyInfoManager.Instance.Point.ToString(); LabelUtil.TextOut(crdClanCreatePoint, text, "Label", new Color(0.87f, 0.63f, 0.32f, 1f), GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); LabelUtil.TextOut(crdClanHasPoint, text2, "Label", new Color(0.87f, 0.63f, 0.32f, 1f), GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); Rect rc2 = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc2, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); bool enabled = GUI.enabled; if (reasonCombo.IsClickedComboButton()) { GUI.enabled = false; } imgList.Draw(); labelList.Draw(); regMap.Draw(); mapName.Draw(); textDetail.Draw(); ok.Draw(); exit.Draw(); GUI.enabled = enabled; reasonCombo.Draw(); if (ok.isClick()) { if (IsRightReason()) { if (textDetail.GetInputText().Length > 0) { CSNetManager.Instance.Sock.SendCS_ACCUSE_MAP_REQ(reasonCombo.Select - 1, regMap.GetRegMapId(), textDetail.GetInputText()); result = true; } else { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("REPORT_GM_MESSAGE_04")); } } else { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("REPORT_GM_REASON_SELECT")); } } if (exit.isClick()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 15f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("ADD_BAN"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); LabelUtil.TextOut(crdMessage, StringMgr.Instance.Get("INPUT_NICKNAME4BAN"), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); string text = banWannabe; GUI.SetNextControlName("BanWannabe"); banWannabe = GUI.TextField(crdBanTxtFld, banWannabe); if (banWannabe.Length > maxId) { banWannabe = text; } if (GlobalVars.Instance.MyButton(crdAddBan, StringMgr.Instance.Get("ADD_BAN"), "BtnAction")) { banWannabe.Trim(); if (banWannabe.Length > 0) { CSNetManager.Instance.Sock.SendCS_ADD_BAN_BY_NICKNAME_REQ(banWannabe); result = true; } else { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("INPUT_NICKNAME4BAN")); } } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } Dialog top = DialogManager.Instance.GetTop(); if (top != null && top.ID == id) { GUI.FocusWindow((int)id); GUI.FocusControl("BanWannabe"); } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { if (userMap == null) { return(true); } bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.Box(crdOutline, string.Empty, "BoxPopLine"); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("RENAME_MAP"), "BigLabel", GlobalVars.Instance.txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperCenter); LabelUtil.TextOut(crdCurAliasLabel, StringMgr.Instance.Get("MAP_NAME_IS"), "Label", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperRight); GUI.Label(crdCurAlias, userMap.Alias); LabelUtil.TextOut(crdNewAliasLabel, StringMgr.Instance.Get("NEW_MAP_NAME"), "Label", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperRight); string text = newMapAlias; GUI.SetNextControlName("AliasInput"); newMapAlias = GUI.TextField(crdNewAlias, newMapAlias, maxAlias); if (newMapAlias.Length > maxAlias) { newMapAlias = text; } if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction") && CheckAlias()) { CSNetManager.Instance.Sock.SendCS_CHANGE_USERMAP_ALIAS_REQ((sbyte)userMap.Slot, newMapAlias); result = true; } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } Dialog top = DialogManager.Instance.GetTop(); if (top != null && top.ID == id) { GUI.FocusWindow((int)id); GUI.FocusControl("AliasInput"); } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); LabelUtil.TextOut(crdTitle, StringMgr.Instance.Get("CONFIRM_BUY"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); ShowGood(); string str = string.Empty; if (autoChargeConfirm.Length > 0 && !BuildOption.Instance.IsNetmarble && !BuildOption.Instance.IsDeveloper) { str = autoChargeConfirm + " "; } str += StringMgr.Instance.Get("ARE_YOU_SURE_BUY"); GUI.Label(crdSure, str, "Label"); if (tItem.IsEquipable) { wasEquip = GUI.Toggle(crdToggle, wasEquip, StringMgr.Instance.Get("CHECK_DIRECT_EQUIP")); } if (GlobalVars.Instance.MyButton(crdBuy, StringMgr.Instance.Get("OK"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { if (cantBuy) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("NOT_ENOUGH_MONEY")); } else { if (rebuy < 0) { CSNetManager.Instance.Sock.SendCS_BUY_ITEM_REQ(good.tItem.code, (int)buyHow, good.GetOption(selected, buyHow), good.IsAmount, wasEquip); } else { CSNetManager.Instance.Sock.SendCS_REBUY_ITEM_REQ(rebuy, good.tItem.code, (int)buyHow, good.GetOption(selected, buyHow), good.IsAmount, wasEquip); } result = true; } } if (GlobalVars.Instance.MyButton(crdCloseBtn, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 15f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("MAP_EVAL"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); GUI.Box(crdOutline, string.Empty, "LineBoxBlue"); DoGoodBad(); LabelUtil.TextOut(crdLineEval, StringMgr.Instance.Get("A_LINE_EVAL"), "MidLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); string text = strEval; GUI.SetNextControlName("Evalu"); strEval = GUI.TextField(crdEvalFld, strEval); if (strEval.Length > maxEvalLength) { strEval = text; } LabelUtil.TextOut(crdWarn1, StringMgr.Instance.Get("MAP_EVAL_WARN_1"), "MidLabel", Color.red, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); LabelUtil.TextOut(crdWarn2, StringMgr.Instance.Get("MAP_EVAL_WARN_2"), "MidLabel", Color.red, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); Rect rc = new Rect(size.x - 187f, size.y - 44f, 176f, 34f); if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("DO_EVAL"), "BtnAction") || GlobalVars.Instance.IsReturnPressed()) { if (!isGood && !isBad) { MessageBoxMgr.Instance.AddMessage(StringMgr.Instance.Get("LIKE_OR_DISLIKE")); } else { CSNetManager.Instance.Sock.SendCS_MAP_EVAL_REQ(playmap, (byte)(isGood ? 1 : 0), strEval); result = true; } } Rect rc2 = new Rect(size.x - 50f, 10f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc2, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("PROMOTE_MSG01"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); GUI.Box(crdCongBox, string.Empty, "LineBoxBlue"); TextureUtil.DrawTexture(crdKing, iconKing); GUI.Label(crdCongLabel, StringMgr.Instance.Get("PROMOTE_MSG02"), "Label"); GUI.Box(crdExplBox, string.Empty, "BoxFadeBlue"); LabelUtil.TextOut(crdNewRank, StringMgr.Instance.Get("PROMOTE_MSG03") + " :", "Label", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); Texture2D badge = XpManager.Instance.GetBadge(myLv, MyInfoManager.Instance.Rank); string rank = XpManager.Instance.GetRank(myLv, MyInfoManager.Instance.Rank); if (null != badge) { TextureUtil.DrawTexture(crdMyBadge, badge); LabelUtil.TextOut(crdMyRank, rank, "Label", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); } DoLevelupCompensation(rank); if (myLv < XpManager.Instance.MaxLevelByXp) { int lv = myLv + 1; string rank2 = XpManager.Instance.GetRank(lv, MyInfoManager.Instance.Rank); DoNextLevelupCompensation(lv, rank2); } else { LabelUtil.TextOut(crdNoMoreLevelupCompNext, StringMgr.Instance.Get("NO_MORE_LEVELUP_COMPENSATION"), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); } DoYouCanBuy(); Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("CREATE_TEAM"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); GUI.Box(crdOutline, string.Empty, "LineBoxBlue"); LabelUtil.TextOut(crdCreateMatchTeamComment, StringMgr.Instance.Get("CREATE_TEAM_COMMENT"), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); if (GlobalVars.Instance.MyButton(crdLeft, string.Empty, "Left")) { numPlayer--; if (numPlayer < minPlayer) { numPlayer = minPlayer; } } GUI.Box(crdNumPlayerBg, string.Empty, "BoxTextBg"); LabelUtil.TextOut(crdNumPlayerValue, numPlayer.ToString() + "vs" + numPlayer.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); if (GlobalVars.Instance.MyButton(crdRight, string.Empty, "Right")) { numPlayer++; if (numPlayer > maxPlayer) { numPlayer = maxPlayer; } } if (GlobalVars.Instance.MyButton(crdCreate, StringMgr.Instance.Get("OK"), "BtnAction")) { CSNetManager.Instance.Sock.SendCS_CREATE_SQUAD_REQ(MyInfoManager.Instance.ClanSeq, GlobalVars.Instance.wannaPlayMap, GlobalVars.Instance.wannaPlayMode, numPlayer); result = true; } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }