Пример #1
0
 private void DoGrenade(Grenade grenade)
 {
     if (null != grenade)
     {
         float num  = grenade.AtkPow / maxAtkPow;
         float num2 = grenade.speedFactor / maxMobility;
         if (num > 1f)
         {
             num = 1f;
         }
         if (num2 > 1f)
         {
             num2 = 1f;
         }
         float num3 = num * 100f;
         float num4 = num2 * 100f;
         DoWeaponPropertyBase();
         Color color = GUI.color;
         GUI.color = Color.yellow;
         TextureUtil.DrawTexture(new Rect(333f, 155f, 104f * num, 12f), gauge, ScaleMode.StretchToFill);
         TextureUtil.DrawTexture(new Rect(333f, 235f, 104f * num2, 12f), gauge, ScaleMode.StretchToFill);
         GUI.color = color;
         LabelUtil.TextOut(new Vector2(390f, 160f), num3.ToString("0.##") + "%", "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         LabelUtil.TextOut(new Vector2(390f, 180f), "N/A", "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         LabelUtil.TextOut(new Vector2(390f, 200f), "N/A", "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         LabelUtil.TextOut(new Vector2(390f, 220f), "N/A", "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         LabelUtil.TextOut(new Vector2(390f, 240f), num4.ToString("0.##") + "%", "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         LabelUtil.TextOut(new Vector2(390f, 260f), grenade.maxAmmo.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
     }
 }
Пример #2
0
 private void DrawMyKill()
 {
     foreach (KillInfo item in logQ)
     {
         if (!(item.Alpha <= 0f) && !(item.DragY >= 36f))
         {
             Color color = GUI.color;
             if (alphaStep == ALPHASTEP.START || item.IsAlpha)
             {
                 item.Alpha -= Time.deltaTime;
                 item.DragY += Time.deltaTime * 36f;
                 if (item.Alpha < 0f)
                 {
                     item.Alpha = 0f;
                     alphaStep  = ALPHASTEP.NONE;
                 }
                 if (item.DragY > 36f)
                 {
                     item.DragY = 36f;
                     alphaStep  = ALPHASTEP.NONE;
                 }
                 GUI.color = new Color(1f, 1f, 1f, item.Alpha);
             }
             TextureUtil.DrawTexture(new Rect(320f, 290f - item.DragY, 384f, 36f), GlobalVars.Instance.iconEnemyKillBg, ScaleMode.StretchToFill);
             TextureUtil.DrawTexture(new Rect(396f, 259f - item.DragY, (float)GlobalVars.Instance.iconEnemyKill.width, (float)GlobalVars.Instance.iconEnemyKill.height), GlobalVars.Instance.iconEnemyKill, ScaleMode.StretchToFill);
             LabelUtil.PushSize("Label", 20);
             LabelUtil.TextOut(new Vector2(531f, 309f - item.DragY), item.Victim, "Label", GUI.color, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft);
             LabelUtil.PopSize();
             GUI.color = color;
             break;
         }
     }
 }
Пример #3
0
 private void OnGUI()
 {
     if (!GlobalVars.Instance.hideOurForcesNickname && MyInfoManager.Instance.isGuiOn && !MyInfoManager.Instance.IsSpectator)
     {
         GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
         GUI.depth   = (int)guiDepth;
         GUI.enabled = !DialogManager.Instance.IsModal;
         GameObject[] array = BrickManManager.Instance.ToGameObjectArray();
         for (int i = 0; i < array.Length; i++)
         {
             Vector3 position = array[i].transform.position;
             position.y += 2f;
             PlayerProperty component = array[i].GetComponent <PlayerProperty>();
             if (null != component && !component.IsHostile() && !component.Desc.IsHidePlayer)
             {
                 Vector3 vector = cam.WorldToViewportPoint(position);
                 if (vector.z > 0f && 0f < vector.x && vector.x < 1f && 0f < vector.y && vector.y < 1f)
                 {
                     Vector3 vector2 = cam.WorldToScreenPoint(position);
                     LabelUtil.TextOut(new Vector2(vector2.x, (float)Screen.height - vector2.y - 20f), component.Desc.Nickname, "Label", Color.green, Color.black, TextAnchor.LowerCenter);
                 }
             }
         }
         GUI.enabled = true;
     }
 }
Пример #4
0
    private void DoTitle()
    {
        Rect position = new Rect((float)(Screen.width - title.width), 0f, (float)title.width, (float)title.height);

        TextureUtil.DrawTexture(position, title);
        LabelUtil.TextOut(new Vector2((float)Screen.width - crdTitle.x, crdTitle.y), StringMgr.Instance.Get("BRICK_KINGS_ORDER"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
    }
Пример #5
0
 private void OnGUI()
 {
     if (MyInfoManager.Instance.isGuiOn)
     {
         GUISkin skin = GUI.skin;
         GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
         GUI.depth   = (int)guiDepth;
         GUI.enabled = !DialogManager.Instance.IsModal;
         int   num      = editorTool.Length;
         float num2     = (float)num * crdToolSize.x + (float)(num + 1) * offset;
         float num3     = crdToolSize.y + crdHotkey.y + crdAmount.y;
         Rect  position = new Rect(((float)Screen.width - num2) / 2f, (float)Screen.height - num3, num2, num3);
         GUI.BeginGroup(position);
         for (int i = 0; i < editorTool.Length; i++)
         {
             Rect position2 = new Rect(offset + (float)i * (crdToolSize.x + offset), crdHotkey.y, crdToolSize.x, crdToolSize.y);
             GUI.Box(new Rect(position2.x + 6f, position2.y - crdHotkey.y, crdHotkey.x, crdHotkey.y), string.Empty, "cns_hotkey");
             GUI.Box(position2, new GUIContent(editorTool[i].Icon), "cns_item");
             Color  clrText = Color.gray;
             string text    = "off";
             if (editorTool[i].IsActive)
             {
                 clrText = new Color(1f, 1f, 0f, 1f);
                 text    = "on";
             }
             GUI.Box(new Rect(position2.x + 38f, position2.y + 46f, crdOnOff.x, crdOnOff.y), string.Empty, "cns_onoff");
             LabelUtil.TextOut(new Vector2(position2.x + 32f, position2.y + 9f - crdHotkey.y), editorTool[i].Hotkey, "TinyLabel", clrText, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
             LabelUtil.TextOut(new Vector2(position2.x + 38f + 10f, position2.y + 46f + 6f), text, "MiniLabel", clrText, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
             GUI.Box(new Rect(position2.x + 11f, position2.y + 60f, crdAmount.x, crdAmount.y), editorTool[i].Amount, "cns_count");
         }
         GUI.EndGroup();
         GUI.enabled = true;
         GUI.skin    = skin;
     }
 }
Пример #6
0
    private void DoLanguage()
    {
        selLang        = cboxLang.List(crdCBoxLang, selLangContent, listLang);
        selLangContent = listLang[selLang];

        LabelUtil.TextOut(crdLangLabel, StringMgr.Instance.Get("LANGUAGE_SELECT"), "Label", clrSubTitle, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        if (GlobalVars.Instance.MyButton(crdApplyLang, StringMgr.Instance.Get("APPLY2"), "BtnAction") && 0 <= selLang && selLang < BuildOption.Instance.Props.supportLanguages.Length)
        {
            int num = (int)BuildOption.Instance.Props.supportLanguages[selLang];
            PlayerPrefs.SetInt("BfLanguage", num);
            LangOptManager.Instance.LangOpt = num;
            GUISkinFinder.Instance.LanguageChanged();
            if (BuildOption.Instance.Props.ShowAgb)
            {
                GlobalVars.Instance.LoadAbg();
            }
            cboxVoice       = null;
            listVoice       = null;
            selVoiceContent = null;
            cboxLang        = null;
            listLang        = null;
            selLangContent  = null;
            cboxCF          = null;
            listCF          = null;
            selCFContent    = null;
            CreateVoice();
            CreateLang();
            CreateCountryFilter();
        }
    }
Пример #7
0
    private void ShowGood()
    {
        GUI.Box(crdOutline, string.Empty, "BoxFadeBlue");
        if (good != null && tItem != null && null != tItem.CurIcon())
        {
            Texture2D texture2D = null;
            switch (buyHow)
            {
            case Good.BUY_HOW.GENERAL_POINT:
                texture2D = fpIcon;
                break;

            case Good.BUY_HOW.BRICK_POINT:
                texture2D = bpIcon;
                break;

            case Good.BUY_HOW.CASH_POINT:
                texture2D = TokenManager.Instance.currentToken.mark;
                break;
            }
            TextureUtil.DrawTexture(new Rect(crdOutline.x + 32f, crdOutline.y + (crdOutline.height - (float)tItem.CurIcon().height) / 2f, (float)tItem.CurIcon().width, (float)tItem.CurIcon().height), tItem.CurIcon());
            Vector2 pos = new Vector2(crdOutline.x + crdOutline.width - 20f, crdOutline.y + 20f);
            LabelUtil.TextOut(pos, tItem.Name, "Label", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
            pos.y += 32f;
            LabelUtil.TextOut(pos, good.GetRemainString(selected, buyHow), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
            pos.y += 32f;
            if (texture2D != null)
            {
                TextureUtil.DrawTexture(crdMoneyIcon, texture2D);
                pos.x -= crdMoneyIcon.width + 10f;
            }
            LabelUtil.TextOut(pos, good.GetPriceString(selected, buyHow), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
        }
    }
Пример #8
0
    private void DoGoodBad()
    {
        bool flag  = isGood;
        bool flag2 = isBad;

        isGood = GUI.Toggle(crdGood, flag, string.Empty);
        isBad  = GUI.Toggle(crdBad, flag2, string.Empty);
        Rect position  = new Rect(crdGood.x + 28f, crdGood.y + 2f, 22f, 22f);
        Rect position2 = new Rect(crdBad.x + 28f, crdBad.y + 2f, 22f, 22f);

        TextureUtil.DrawTexture(position, GlobalVars.Instance.iconThumbUp, ScaleMode.StretchToFill);
        TextureUtil.DrawTexture(position2, GlobalVars.Instance.iconThumbDn, ScaleMode.StretchToFill);
        Vector2 pos  = new Vector2(crdGood.x + 55f, crdGood.y + 6f);
        Vector2 pos2 = new Vector2(crdBad.x + 55f, crdBad.y + 6f);

        LabelUtil.TextOut(pos, StringMgr.Instance.Get("GOOD"), "MidLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(pos2, StringMgr.Instance.Get("BAD"), "MidLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        if (!flag && isGood)
        {
            isBad = false;
        }
        if (!flag2 && isBad)
        {
            isGood = false;
        }
    }
    private void PrintMapInfo(RegMap reg, Vector2 pos)
    {
        Texture2D image = (!(reg.Thumbnail == null)) ? reg.Thumbnail : nonAvailable;

        TextureUtil.DrawTexture(new Rect(pos.x + 5f, pos.y + 10f, crdThumbnail.x, crdThumbnail.y), image, ScaleMode.StretchToFill);
        Color txtMainColor = GlobalVars.Instance.txtMainColor;

        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y - 3f), StringMgr.Instance.Get("DEVELOPER"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 12f), reg.Developer, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y + 37f), StringMgr.Instance.Get("MAP_NAME_IS") + " " + StringMgr.Instance.Get("MAP_VERSION"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 52f), reg.Alias + reg.Version, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y + 77f), StringMgr.Instance.Get("LAST_MODIFIED_DATE"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 92f), DateTimeLocal.ToString(reg.RegisteredDate), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y - 3f), StringMgr.Instance.Get("PLAY_COUNT"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 286f, pos.y + 12f), reg.DisLikes.ToString(), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y + 37f), StringMgr.Instance.Get("DOWNLOAD_COUNT"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 286f, pos.y + 52f), reg.DownloadCount.ToString(), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y + 77f), StringMgr.Instance.Get("MAP_EVAL"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        Rect position = new Rect(pos.x + 286f, pos.y + 95f, 74f, 14f);

        TextureUtil.DrawTexture(position, texStarGradeBg, ScaleMode.StretchToFill);
        Vector2 pos2 = new Vector2(position.x + 80f, position.y - 4f);
        string  text = "[ " + reg.GetStarAvgString() + " ]";

        LabelUtil.TextOut(pos2, text, "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        float num = (float)reg.Likes / 100f;

        TextureUtil.DrawTexture(new Rect(position.x, position.y, position.width * num, position.height), srcRect: new Rect(0f, 0f, num, 1f), image: texStarGrade);
    }
    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);
    }
Пример #11
0
 private void OnGUI()
 {
     if (MyInfoManager.Instance.isGuiOn)
     {
         GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
         GUI.depth   = (int)guiDepth;
         GUI.enabled = !DialogManager.Instance.IsModal;
         if (0 <= endCode && endCode < endImage.Length && showRoundMessage)
         {
             endCodeDelta += Time.deltaTime;
             if (endCodeDelta > 0.5f)
             {
                 Texture2D texture2D = endImage[endCode];
                 GUI.DrawTexture(new Rect((float)((Screen.width - texture2D.width) / 2), (float)((Screen.height - texture2D.height) / 2 - 30), (float)texture2D.width, (float)texture2D.height), texture2D, ScaleMode.StretchToFill);
                 if (endCodeDelta > endCodeLimit)
                 {
                     endCodeDelta = 0f;
                     endCode      = -1;
                 }
             }
         }
         if (statusMessage.Length > 0)
         {
             float a   = 1f;
             float num = (statusDelta - (statusMessageLimit - 2f)) / 2f;
             if (num > 0f)
             {
                 a = Mathf.Lerp(1f, 0f, num);
             }
             LabelUtil.TextOut(new Vector2((float)(Screen.width / 2 + 2), (float)(Screen.height / 2 + 32)), statusMessage, "BigLabel", new Color(0f, 0f, 0f, a), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
             LabelUtil.TextOut(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 + 30)), statusMessage, "BigLabel", new Color(0.91f, 0.6f, 0f, a), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
         }
         GUI.enabled = true;
     }
 }
    public void DoOption(Room room)
    {
        float num = crdOptionLT.y;

        if (isRoom)
        {
            int weaponOption = RoomManager.Instance.WeaponOption;
            LabelUtil.TextOut(new Vector2(optionLX, num), StringMgr.Instance.Get("NUCLEAR_LIFE"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, num - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
            LabelUtil.TextOut(new Vector2(optionRX, num), weaponOption.ToString(), "MiniLabel", new Color(0.91f, 0.6f, 0f, 1f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            num += diff_y;
        }
        int num2 = room.timelimit / 60;

        LabelUtil.TextOut(new Vector2(optionLX, num), StringMgr.Instance.Get("TIME_LIMIT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, num - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, num), num2.ToString() + StringMgr.Instance.Get("MINUTES"), "MiniLabel", new Color(0.91f, 0.6f, 0f, 1f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        num += diff_y;
        Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(25, 179, 0);

        LabelUtil.TextOut(new Vector2(crdOptionLT.x, num), StringMgr.Instance.Get("BREAK_INTO") + " : " + ((!room.isBreakInto) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        num += diff_y2;
        if (BuildOption.Instance.Props.UseItemDrop)
        {
            LabelUtil.TextOut(new Vector2(crdOptionLT.x, num), StringMgr.Instance.Get("ROOM_SET_ITEMDROP") + " : " + ((!room.isDropItem) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            num += diff_y2;
        }
    }
Пример #13
0
    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);
    }
Пример #14
0
    private void DoMoney()
    {
        Texture2D mark = TokenManager.Instance.currentToken.mark;

        GUI.Box(crdMoneyInfo, string.Empty, "BoxFadeBlue");
        Vector2 vector = new Vector2(crdMoneyInfo.x + 10f, crdMoneyInfo.y + 7f);
        Vector2 pos    = new Vector2(crdMoneyInfo.x + crdMoneyInfo.width - 10f, crdMoneyInfo.y + 5f);

        if (tcStatus.TokenPrice != 0)
        {
            TextureUtil.DrawTexture(new Rect(vector.x, vector.y, (float)mark.width, (float)mark.height), mark);
            string text    = tcStatus.TokenPrice.ToString() + " / " + MyInfoManager.Instance.Cash;
            Color  clrText = new Color(0.2f, 0.75f, 0.06f);
            if (tcStatus.TokenPrice > MyInfoManager.Instance.Cash)
            {
                clrText = Color.red;
            }
            LabelUtil.TextOut(pos, text, "Label", clrText, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
            vector.y += 20f;
            pos.y    += 20f;
        }
        if (tcStatus.CoinPrice != 0)
        {
            TextureUtil.DrawTexture(new Rect(vector.x, vector.y, (float)coin.width, (float)coin.height), coin);
            string text    = tcStatus.CoinPrice.ToString() + " / " + MyInfoManager.Instance.FreeCoin;
            Color  clrText = GlobalVars.Instance.txtMainColor;
            if (tcStatus.CoinPrice > MyInfoManager.Instance.FreeCoin)
            {
                clrText = Color.red;
            }
            LabelUtil.TextOut(pos, text, "Label", clrText, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
        }
    }
Пример #15
0
 private void OnGUI()
 {
     if (MyInfoManager.Instance.isGuiOn && BrickManager.Instance.IsLoaded)
     {
         GUISkin gUISkin = GUISkinFinder.Instance.GetGUISkin();
         if (null != gUISkin && MyInfoManager.Instance.IsSpectator)
         {
             GUI.skin    = gUISkin;
             GUI.depth   = (int)guiDepth;
             GUI.enabled = !DialogManager.Instance.IsModal;
             string text = string.Empty;
             if (null == target)
             {
                 text = StringMgr.Instance.Get("NO_SPECTATABLE_PLAYER");
             }
             else
             {
                 PlayerProperty component = target.GetComponent <PlayerProperty>();
                 if (null != component)
                 {
                     text = component.Desc.Nickname;
                 }
             }
             LabelUtil.TextOut(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 - 202)), text, "BigLabel", clrOutline, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
             LabelUtil.TextOut(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 - 200)), text, "BigLabel", clrText, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
             GUI.enabled = true;
         }
     }
 }
    private bool DoPrice()
    {
        GUI.Box(crdPriceBox, string.Empty, "BoxFadeBlue");
        LabelUtil.TextOut(crdPriceLabel, StringMgr.Instance.Get("DOWNLOAD_FEE"), "Label", new Color(0.76f, 0.54f, 0.27f), GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        bool   flag = false;
        string text = StringMgr.Instance.Get("BRICK_POINT");
        int    num  = (!RegMapManager.Instance.IsDeleted(regMap.Map)) ? regMap.DownloadFee : 0;
        int    num2 = num;

        switch (buyHow)
        {
        case Good.BUY_HOW.GENERAL_POINT:
            if (BuildOption.Instance.Props.useBrickPoint)
            {
                num2 = num * 10;
            }
            text = StringMgr.Instance.Get("GENERAL_POINT");
            flag = (MyInfoManager.Instance.Point >= num2);
            break;

        case Good.BUY_HOW.BRICK_POINT:
            flag = (MyInfoManager.Instance.BrickPoint >= num2);
            break;

        case Good.BUY_HOW.CASH_POINT:
            text = TokenManager.Instance.GetTokenString();
            num2 = ((!BuildOption.Instance.Props.useBrickPoint) ? Mathf.FloorToInt((float)num * 0.02f) : Mathf.FloorToInt((float)num * 0.2f));
            flag = (MyInfoManager.Instance.Cash >= num2);
            break;
        }
        Debug.Log(BuildOption.Instance.Props.useBrickPoint.ToString() + num + "  " + num2 + "  " + Time.frameCount);
        LabelUtil.TextOut(crdPrice, num2.ToString(), "Label", (!flag) ? Color.red : Color.green, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
        LabelUtil.TextOut(crdPointString, text, "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        return(flag);
    }
Пример #17
0
 private void DrawToolButtonHelpText(Rect rc, string helpText)
 {
     if (BuildOption.Instance.IsNetmarble || BuildOption.Instance.IsDeveloper || BuildOption.Instance.IsInfernum || BuildOption.Instance.IsTester)
     {
         LabelUtil.TextOut(new Vector2(rc.x + rc.width / 2f, 58f), helpText, "MiniLabel", GlobalVars.Instance.GetByteColor2FloatColor(50, 191, 17), GlobalVars.txtEmptyColor, TextAnchor.LowerCenter);
     }
 }
    public void DoOption(Room room)
    {
        float y   = crdOptionLT.y;
        int   num = room.timelimit / 60;

        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("TIME_LIMIT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), num.ToString() + StringMgr.Instance.Get("MINUTES"), "MiniLabel", new Color(0.91f, 0.6f, 0f, 1f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("ARRIVAL_COUNT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), room.goal.ToString() + StringMgr.Instance.Get("TIMES_UNIT"), "MiniLabel", new Color(0.91f, 0.6f, 0f, 1f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(25, 179, 0);

        LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("BREAK_INTO") + " : " + ((!room.isBreakInto) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y2;
        if (BuildOption.Instance.Props.UseEscapeAttack)
        {
            LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("ESCAPE_MODE_OPTION_01") + " : " + ((room.weaponOption == 3) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y2;
            if (BuildOption.Instance.Props.UseItemDrop && room.weaponOption != 3)
            {
                LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("ROOM_SET_ITEMDROP") + " : " + ((!room.isDropItem) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
                y += diff_y2;
            }
        }
    }
Пример #19
0
 private void OnGUI()
 {
     GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
     GUI.depth   = (int)guiDepth;
     GUI.enabled = !DialogManager.Instance.IsModal;
     if (text.Length > 0)
     {
         float num = calcTitleBoxHeight();
         Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(139, 222, 32);
         Rect  position             = new Rect(0f, 217f, 254f, 26f);
         GUI.Box(position, string.Empty, "BoxTuto2");
         LabelUtil.TextOut(new Vector2(254f, 221f), progress, "MissionLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.UpperRight);
         Rect position2 = new Rect(0f, 245f, 254f, num);
         GUI.Box(position2, string.Empty, "BoxTuto2");
         GUI.Box(new Rect(5f, position2.y - 20f, 34f, 78f), string.Empty, "TutoPoint");
         Color color = GUI.color;
         GUI.color = GlobalVars.Instance.GetByteColor2FloatColor(139, 222, 32);
         GUI.Label(new Rect(position2.x + 40f, position2.y + titley, 200f, titleh), title, "MissionTitleLabel");
         GUI.color = color;
         GUI.Label(new Rect(position2.x + 40f, position2.y + suby, 200f, subh), sub, "MissionSubTitleLabel");
         if (drawWeaponIcon)
         {
             Rect position3 = new Rect(0f, 245f + num + 2f, 254f, 220f);
             GUI.Box(position3, string.Empty, "BoxTuto2");
             TextureUtil.DrawTexture(new Rect(30f, position3.y, (float)wpnicons[iconidx].width, (float)wpnicons[iconidx].height), wpnicons[iconidx]);
             GUI.color = GlobalVars.Instance.txtMainColor;
             GUI.Label(new Rect(5f, position3.y + 105f, 200f, 25f), StringMgr.Instance.Get(wpnNames[iconidx]), "MissionTitleLabel");
             GUI.color = color;
             GUI.Label(new Rect(5f, position3.y + 120f, 200f, 100f), StringMgr.Instance.Get(wpnEXpls[iconidx]), "MissionSubTitleLabel");
         }
     }
     GUI.enabled = true;
 }
    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);
    }
Пример #21
0
    public void DoOption(Room room)
    {
        float y   = crdOptionLT.y;
        int   num = room.timelimit / 60;

        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("TIME_LIMIT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), num.ToString() + StringMgr.Instance.Get("MINUTES"), "MiniLabel", new Color(0.91f, 0.6f, 0f, 1f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        if (isRoom)
        {
            LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("WEAPON_OPTION"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
            string text = (room.weaponOption >= 0 && room.weaponOption < weaponOptions.Length) ? StringMgr.Instance.Get(weaponOptions[room.weaponOption]) : string.Empty;
            LabelUtil.TextOut(new Vector2(optionRX, y), text, "MiniLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y;
        }
        Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(25, 179, 0);

        LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("BREAK_INTO") + " : " + ((!room.isBreakInto) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y2;
        if (BuildOption.Instance.Props.UseItemDrop)
        {
            LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("ROOM_SET_ITEMDROP") + " : " + ((!room.isDropItem) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y2;
        }
        if (isRoom)
        {
            LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("TEAM_BALANCE") + " : " + ((!RoomManager.Instance.TeamBalance) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y2;
        }
    }
Пример #22
0
    private float _ListYouCanBuy(float y, Good[] array)
    {
        Rect    position = new Rect(10f, 0f, crdIconSize.x, crdIconSize.y);
        Vector2 pos      = new Vector2(20f + crdIconSize.x, 0f);

        foreach (Good good in array)
        {
            string empty = string.Empty;
            empty = empty + "- " + good.tItem.Name;
            if (good.tItem.CurIcon() != null)
            {
                position.y = y;
                TextureUtil.DrawTexture(position, good.tItem.CurIcon());
            }
            if (myLv == good.minlvFp)
            {
                empty = empty + " ( " + StringMgr.Instance.Get("POINT") + " )";
            }
            else if (myLv == good.minlvTk)
            {
                empty = empty + " ( " + TokenManager.Instance.GetTokenString() + " )";
            }
            if (empty.Length > 0)
            {
                pos.y = y + crdIconSize.y / 2f;
                LabelUtil.TextOut(pos, empty, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft);
                y += crdIconSize.y;
            }
        }
        return(y);
    }
Пример #23
0
 private void OnGUI()
 {
     if (bLoaded && MyInfoManager.Instance.isGuiOn)
     {
         GUISkin skin = GUI.skin;
         GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
         GUI.depth   = (int)guiDepth;
         GUI.enabled = !DialogManager.Instance.IsModal;
         if (listEffectivePoint.Count > 0)
         {
             GameObject gameObject = GameObject.Find("Main Camera");
             if (null != gameObject)
             {
                 maincam = gameObject.GetComponent <Camera>();
             }
             foreach (EffectivePoint item in listEffectivePoint)
             {
                 if (maincam != null)
                 {
                     Vector3 vector = maincam.WorldToViewportPoint(item.position);
                     if (vector.z > 0f && 0f < vector.x && vector.x < 1f && 0f < vector.y && vector.y < 1f)
                     {
                         Vector3 sp = maincam.WorldToScreenPoint(item.position);
                         LabelUtil.TextOut(sp, "+p", "BigLabel", item.color, Color.black, TextAnchor.MiddleCenter);
                     }
                 }
             }
         }
         GUI.enabled = true;
         GUI.skin    = skin;
     }
 }
Пример #24
0
    private void DoFollower()
    {
        Squad curSquad = SquadManager.Instance.CurSquad;

        GUI.Box(crdFlwrOutline, string.Empty, "LineBoxBlue");
        GUI.Box(crdFlwrMap, string.Empty, "BoxFadeBlue");
        if (curSquad != null)
        {
            RegMap regMap = RegMapManager.Instance.Get(curSquad.WannaPlayMap);
            if (regMap != null)
            {
                Texture2D thumbnail = regMap.Thumbnail;
                if (null == thumbnail)
                {
                    TextureUtil.DrawTexture(crdFlwrThumbnail, nonAvailable);
                }
                else
                {
                    TextureUtil.DrawTexture(crdFlwrThumbnail, thumbnail);
                }
                LabelUtil.TextOut(crdFlwrMapAlias, regMap.Alias, "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            }
            LabelUtil.TextOut(crdFlwrMode, Room.Type2String((Room.ROOM_TYPE)curSquad.WannaPlayMode), "Label", new Color(0.54f, 0.54f, 0.54f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            LabelUtil.TextOut(crdFlwrNumPlayer, curSquad.MaxMember.ToString() + "vs" + curSquad.MaxMember.ToString(), "Label", new Color(0.54f, 0.54f, 0.54f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        }
    }
Пример #25
0
    private void DoComment()
    {
        GUI.SetNextControlName("ClanName");
        clanName = GUI.TextField(crdClanName, clanName, maxClanName);
        clanName = clanName.Replace(" ", string.Empty);
        clanName = clanName.Replace("\t", string.Empty);
        clanName = clanName.Replace("\n", string.Empty);
        if (GlobalVars.Instance.MyButton(crdCheckAvailability, StringMgr.Instance.Get("CHECK_AVAILABILITY"), "BtnAction") && CheckInput())
        {
            CSNetManager.Instance.Sock.SendCS_CHECK_CLAN_NAME_AVAILABILITY_REQ(clanName);
        }
        string text = StringMgr.Instance.Get("CLAN_CREATE_COMMENT");

        if (availableName.Length > 0)
        {
            text = ((!clanNameIsAvailable) ? string.Format(StringMgr.Instance.Get("NAME_IS_NOT_AVAILABLE"), availableName) : string.Format(StringMgr.Instance.Get("NAME_IS_AVAILABLE"), availableName));
        }
        Dialog top = DialogManager.Instance.GetTop();

        if (top != null && top.ID == id)
        {
            GUI.FocusWindow((int)id);
            GUI.FocusControl("ClanName");
        }
        LabelUtil.TextOut(crdCommentLabel, text, "Label", new Color(0.87f, 0.63f, 0.32f, 1f), GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
    }
Пример #26
0
    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    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);
    }
Пример #28
0
        /// <summary>
        /// Erstellt ein Label, wenn verloren oder gewonne wurde
        /// </summary>
        /// <param name="won"></param>
        private void CreateGameStateLabel(bool won)
        {
            if (won)
            {
                _lblContinue  = LabelUtil.Create(Resources.Next, 25);
                _lblGameState = LabelUtil.Create(Resources.Win, 25);
            }
            else
            {
                _lblContinue  = LabelUtil.Create(Resources.Again, 25);
                _lblGameState = LabelUtil.Create(Resources.Lost, 25);
            }

            _container.Controls.Add(_lblGameState);
            _container.Controls.Add(_lblContinue);

            var x = _container.Width / 2;
            var y = _container.Height / 2;

            x = x - (_lblGameState.Width / 2);

            _lblContinue.Location  = new Point(x, y);
            _lblContinue.AutoSize  = false;
            _lblContinue.Click    += OnClick;
            _lblContinue.Size      = _lblGameState.Size;
            _lblContinue.TextAlign = ContentAlignment.MiddleCenter;

            y = y - (_lblGameState.Height);

            _lblGameState.Location = new Point(x, y);
        }
Пример #29
0
    private void PrintMapInfo(RegMap reg)
    {
        Color txtMainColor = GlobalVars.Instance.txtMainColor;

        LabelUtil.TextOut(crdDeveloperLabel, StringMgr.Instance.Get("DEVELOPER") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDeveloperVal, reg.Developer, "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapAliasLabel, StringMgr.Instance.Get("MAP_NAME_IS") + " " + StringMgr.Instance.Get("MAP_VERSION") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapAliasVal, reg.Alias + reg.Version, "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdLastModifiedLabel, StringMgr.Instance.Get("LAST_MODIFIED_DATE"), "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdLastModifiedVal, DateTimeLocal.ToString(reg.RegisteredDate), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdPlayCountLabel, StringMgr.Instance.Get("PLAY_COUNT") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdPlayCountVal, reg.DisLikes.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadCountLabel, StringMgr.Instance.Get("DOWNLOAD_COUNT") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadCountVal, reg.DownloadCount.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadFeeLabel, StringMgr.Instance.Get("DOWNLOAD_FEE") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadFeeVal, reg.DownloadFee.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapEvalLabel, StringMgr.Instance.Get("MAP_EVAL") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        TextureUtil.DrawTexture(crdStar, texStarGradeBg, ScaleMode.StretchToFill);
        LabelUtil.TextOut(crdGradeText, "[ " + reg.GetStarAvgString() + " ]", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        float num      = (float)reg.Likes / 100f;
        Rect  position = new Rect(crdStar.x, crdStar.y, crdStar.width * num, crdStar.height);

        GUI.BeginGroup(position);
        TextureUtil.DrawTexture(new Rect(0f, 0f, crdStar.width, crdStar.height), texStarGrade);
        GUI.EndGroup();
        LabelUtil.TextOut(crdSupportModeLabel, StringMgr.Instance.Get("SUPPORT_MODE") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
    }
    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);
    }