Example #1
0
 public static string GetDesc(AttrType type, long value, string hyphen, string typeColor, string valueColor, bool isHyphenAccordWithType)
 {
     if (isHyphenAccordWithType)
     {
         return(string.Format("{0}{1}", TextColorMgr.GetColor(string.Format("{0}{1}", AttrUtility.GetAttrName(type), hyphen), typeColor, string.Empty), TextColorMgr.GetColor(AttrUtility.GetAttrValueDisplay(type, value), valueColor, string.Empty)));
     }
     return(string.Format("{0}{1}", TextColorMgr.GetColor(AttrUtility.GetAttrName(type), typeColor, string.Empty), TextColorMgr.GetColor(string.Format("{0}{1}", hyphen, AttrUtility.GetAttrValueDisplay(type, value)), valueColor, string.Empty)));
 }
Example #2
0
 protected void SetMyMine(int mineID)
 {
     if (DataReader <JunTuanZhanCaiJi> .Contains(mineID))
     {
         this.MineAndReportUIMyInfoText.set_text(TextColorMgr.GetColor(string.Format(GameDataUtils.GetChineseContent(515119, false), GameDataUtils.GetChineseContent(DataReader <JunTuanZhanCaiJi> .Get(mineID).Name, false)), "67ff7d", string.Empty));
     }
     else
     {
         this.MineAndReportUIMyInfoText.set_text(TextColorMgr.GetColor(GameDataUtils.GetChineseContent(515129, false), "67ff7d", string.Empty));
     }
 }
Example #3
0
 public static string GetItemProfession(Items dataItem)
 {
     if (dataItem.career == 0 || dataItem.career == 999)
     {
         return(GameDataUtils.GetChineseContent(514099, false));
     }
     if (dataItem.career == EntityWorld.Instance.EntSelf.TypeID)
     {
         return(TextColorMgr.GetColor(UIUtils.GetRoleName(dataItem.career), "A55A41", string.Empty));
     }
     return(TextColorMgr.GetColorByID(UIUtils.GetRoleName(dataItem.career), 1000007));
 }
Example #4
0
 protected string FormatMinePointTextColor(GuildWarManager.MineState mineState, string text)
 {
     if (mineState == GuildWarManager.MineState.My)
     {
         return(TextColorMgr.GetColor(text, "6adc32", string.Empty));
     }
     if (mineState != GuildWarManager.MineState.Enemy)
     {
         return(TextColorMgr.GetColor(text, "efefef", string.Empty));
     }
     return(TextColorMgr.GetColor(text, "ff4040", string.Empty));
 }
 protected string GetName()
 {
     if (this.mineLiveData == null || this.mineLiveData.get_Count() < 3)
     {
         return(GameDataUtils.GetChineseContent(515082, false));
     }
     return(TextColorMgr.GetColor(string.Format(GameDataUtils.GetChineseContent(515081, false), new object[]
     {
         GameDataUtils.GetChineseContent(DataReader <JunTuanZhanCaiJi> .Get(this.guildWarMineNPCDataID).Name, false),
         TextColorMgr.GetColor(this.mineLiveData.get_Item(0), "6adc32", string.Empty),
         TextColorMgr.GetColor(this.mineLiveData.get_Item(1), "ff4040", string.Empty),
         this.mineLiveData.get_Item(2)
     }), "f1e5b7", string.Empty));
 }
 public void SetSelect(bool isSelect)
 {
     if (isSelect)
     {
         ResourceManager.SetSprite(this.btnImage, ResourceManager.GetIconSprite("fenleianniu_1"));
         this.btnName.set_fontSize(28);
         this.btnName.set_text(TextColorMgr.GetColor(this.text, "fffae6", string.Empty));
     }
     else
     {
         ResourceManager.SetSprite(this.btnImage, ResourceManager.GetIconSprite("fenleianniu_2"));
         this.btnName.set_fontSize(26);
         this.btnName.set_text(TextColorMgr.GetColor(this.text, "ffd78c", string.Empty));
     }
 }
Example #7
0
    public void ShowAsFloatTip(Transform actorRoot, string text, string color, bool isShowBg, float duration, float duration_alpha, float height, float floatHeight)
    {
        base.get_transform().set_name("AsFloatTip");
        this.m_actorRoot = actorRoot;
        this.m_height    = height;
        this.UpdatePos();
        this.m_lblText.set_text(TextColorMgr.GetColor(text, color, string.Empty));
        float num = Mathf.Max(300f, this.m_lblText.get_preferredWidth() + 100f);

        this.mBackground.set_sizeDelta(new Vector2(num, this.mBackground.get_sizeDelta().y));
        this.mBackground.get_gameObject().SetActive(isShowBg);
        this.m_BaseTweenAlphaBaseTime.TweenAlpha(1f, 0f, duration - duration_alpha, duration_alpha, delegate
        {
            FloatTipManager.FloatTipPool.ReUse(base.get_gameObject());
        });
        Vector3 dstPosition = new Vector3(0f, floatHeight, 0f);

        this.m_BaseTweenPostion.MoveTo(dstPosition, duration);
    }
Example #8
0
    public void Underline(float button_width, int button_height, bool showItemColor = true)
    {
        if (this.m_myRectTransform == null)
        {
            return;
        }
        this.m_myRectTransform.set_sizeDelta(new Vector2(button_width, (float)button_height));
        string text           = string.Empty;
        float  num            = this.m_myRectTransform.get_sizeDelta().x;
        int    fontSize       = button_height - 4;
        float  preferredWidth = ChatManager.Instance.GetPreferredWidth("_", fontSize, false);

        if (preferredWidth <= 0f)
        {
            return;
        }
        while (num > 0f)
        {
            text += "_";
            num  -= preferredWidth;
        }
        string color = "301414";

        if (this.m_detailInfo != null)
        {
            if (this.m_detailInfo.type == DetailType.DT.Interface)
            {
                color = "28c800";
            }
            else if (this.m_detailInfo.type == DetailType.DT.Equipment && showItemColor)
            {
                Items items = DataReader <Items> .Get(this.m_detailInfo.cfgId);

                if (items != null)
                {
                    color = TextColorMgr.RGB.GetRGB(items.color);
                }
            }
        }
        this.m_underline_shadow.set_effectColor(XUtility.ReturnColorFromString(color, 128));
        this.m_underline.set_text(TextColorMgr.GetColor(text, color, string.Empty));
        this.m_underline.set_fontSize(fontSize);
    }
Example #9
0
    public string GetMultiPvpOpenTimeText(int index = 0)
    {
        HuoDongZhongXin activityCfgData = ActivityCenterManager.Instance.GetActivityCfgData(ActivityType.MultiPVP);

        if (activityCfgData != null)
        {
            DateTime preciseServerTime = TimeManager.Instance.PreciseServerTime;
            int      i = 0;
            while (i < activityCfgData.starttime.get_Count())
            {
                string[] array = activityCfgData.starttime.get_Item(i).Split(new char[]
                {
                    ':'
                });
                int      num    = int.Parse((!array[0].StartsWith("0")) ? array[0] : array[0].Substring(1));
                int      num2   = int.Parse((!array[1].StartsWith("0")) ? array[1] : array[1].Substring(1));
                string[] array2 = activityCfgData.endtime.get_Item(i).Split(new char[]
                {
                    ':'
                });
                int      num3      = int.Parse((!array2[0].StartsWith("0")) ? array2[0] : array2[0].Substring(1));
                int      num4      = int.Parse((!array2[1].StartsWith("0")) ? array2[1] : array2[1].Substring(1));
                DateTime dateTime  = new DateTime(preciseServerTime.get_Year(), preciseServerTime.get_Month(), preciseServerTime.get_Day(), num, num2, 0);
                DateTime dateTime2 = new DateTime(preciseServerTime.get_Year(), preciseServerTime.get_Month(), preciseServerTime.get_Day(), num3, num4, 0);
                if (index == i)
                {
                    if (ActivityCenterManager.Instance.CheckActivityIsOpen(10006) && dateTime <= preciseServerTime && preciseServerTime <= dateTime2)
                    {
                        string text = activityCfgData.starttime.get_Item(i) + "-" + activityCfgData.endtime.get_Item(i) + "(进行中)";
                        return(TextColorMgr.GetColor(text, "fffae6", string.Empty));
                    }
                    string text2 = activityCfgData.starttime.get_Item(i) + "-" + activityCfgData.endtime.get_Item(i) + "(未开始)";
                    return(TextColorMgr.GetColor(text2, "4d2a1a", string.Empty));
                }
                else
                {
                    i++;
                }
            }
        }
        return(string.Empty);
    }
Example #10
0
 protected override void InitUI()
 {
     base.InitUI();
     base.FindTransform("GuideOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("新手指引开关", "4B3C32", string.Empty));
     base.FindTransform("PostProcessOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("画面后期特效:", "78503C", string.Empty));
     base.FindTransform("PNName").GetComponent <Text>().set_text(TextColorMgr.GetColor("主城玩家显示数量", "4B3C32", string.Empty));
     base.FindTransform("ResolutionSettingName").GetComponent <Text>().set_text(TextColorMgr.GetColor("分辨率设置:", "78503C", string.Empty));
     base.FindTransform("ResolutionOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("不开启", "78503C", string.Empty));
     base.FindTransform("ResolutionOn1Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("1920", "FFFFFF", string.Empty));
     base.FindTransform("ResolutionOn2Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("1280", "FFFFFF", string.Empty));
     base.FindTransform("ResolutionOn3Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("960", "FFFFFF", string.Empty));
     base.FindTransform("AASettingName").GetComponent <Text>().set_text(TextColorMgr.GetColor("抗锯齿级别", "4B3C32", string.Empty));
     base.FindTransform("AAOn1Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("0", "78503C", string.Empty));
     base.FindTransform("AAOn2Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("2", "78503C", string.Empty));
     base.FindTransform("AAOn3Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("4", "78503C", string.Empty));
     base.FindTransform("AAOn4Text").GetComponent <Text>().set_text(TextColorMgr.GetColor("8", "78503C", string.Empty));
     base.FindTransform("MusicOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("游戏声音", "78503C", string.Empty));
     base.FindTransform("SoundOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("游戏音效", "78503C", string.Empty));
     base.FindTransform("ManNumOnText").GetComponent <Text>().set_text(TextColorMgr.GetColor("显示主城玩家", "78503C", string.Empty));
 }
Example #11
0
    public static string GetItemDescWithTab(Items dataItem, string color = "")
    {
        string text = string.Empty;

        text = ((dataItem.describeId1 <= 0) ? GameDataUtils.DEFAULT_CHINESE : GameDataUtils.GetChineseContent(dataItem.describeId1, false));
        if (dataItem.tab == 5)
        {
            string canEnchantmentPosDesc = EquipGlobal.GetCanEnchantmentPosDesc(dataItem.id);
            text += "\n";
            text += "\n";
            if (canEnchantmentPosDesc != string.Empty)
            {
                text = text + "可用部位:" + canEnchantmentPosDesc;
            }
        }
        if (!string.IsNullOrEmpty(color))
        {
            text = TextColorMgr.GetColor(text, color, string.Empty);
        }
        return(text);
    }
Example #12
0
 public void SetCurrentPrivateTalk(long id, string name, bool bReset = false)
 {
     if (!bReset)
     {
         this.CurrentPrivateTalk.Set(id, name);
         ChatUIViewModel.Add2PrivateTalks(this.CurrentPrivateTalk);
         this.ChatSendPlaceholder = "对" + TextColorMgr.GetColor(name, "F87D04", string.Empty) + "说:";
     }
     else
     {
         this.CurrentPrivateTalk.ResetAll();
         if (this.CurrentChatChannel == 4)
         {
             this.ChatSendPlaceholder = "请选择私聊对象";
         }
     }
     if (ChatUIViewModel.Instance != null)
     {
         ChatUIViewModel.Instance.BtnPrivateTalkName = this.CurrentPrivateTalk.PrivateTalkName;
     }
 }
Example #13
0
    private void SetEquipSimpleInfoData(long equipId)
    {
        EquipSimpleInfo equipSimpleInfoByEquipID = EquipGlobal.GetEquipSimpleInfoByEquipID(equipId);

        if (equipSimpleInfoByEquipID == null)
        {
            return;
        }
        TaoZhuangDuanZhu equipForgeCfgData = EquipGlobal.GetEquipForgeCfgData(equipId);

        if (equipForgeCfgData != null && equipSimpleInfoByEquipID.suitId > 0)
        {
            ResourceManager.SetSprite(base.FindTransform("ItemFrame").GetComponent <Image>(), ResourceManager.GetIconSprite(equipForgeCfgData.frame));
            base.FindTransform("ItemName").GetComponent <Text>().set_text(TextColorMgr.GetColor(EquipGlobal.GetEquipSuitMarkName(equipSimpleInfoByEquipID.suitId) + GameDataUtils.GetItemName(equipSimpleInfoByEquipID.cfgId, false, 0L), "FF1919", string.Empty));
        }
        Transform transform = base.FindTransform("ImageBinding");

        if (transform != null)
        {
            transform.get_gameObject().SetActive(equipSimpleInfoByEquipID.binding);
        }
    }
Example #14
0
    private static void AddToLogString(string logString, string stackTrace, LogType type)
    {
        switch (type)
        {
        case 0:
        case 4:
            logString = TextColorMgr.GetColor(logString, "FF0000", string.Empty);
            break;

        case 2:
            logString = TextColorMgr.GetColor(logString, "FFE200", string.Empty);
            break;
        }
        if (string.IsNullOrEmpty(DebugUIView.LogString))
        {
            DebugUIView.LogString += logString;
        }
        else
        {
            DebugUIView.LogString = DebugUIView.LogString + "\n" + logString;
        }
    }
    public void Open(Artifact data)
    {
        this.mGWData = data;
        this.mTxTitle.set_text("挑战提示");
        this.mTxTips.set_text("当前战斗力不足,挑战比较危险!");
        TuiJianZhuangBei tuiJianZhuangBei = DataReader <TuiJianZhuangBei> .Get(this.mGWData.id);

        if (tuiJianZhuangBei != null)
        {
            this.mTxPower.set_text(TextColorMgr.GetColor("推荐战斗力:" + tuiJianZhuangBei.recommendedPower, (EntityWorld.Instance.EntSelf.Fighting >= (long)tuiJianZhuangBei.recommendedPower) ? "00c800" : "ee0000", string.Empty));
        }
        this.ClearItem();
        List <zZhuangBeiPeiZhiBiao> recommendEquipsData = GodWeaponManager.Instance.GetRecommendEquipsData(this.mGWData.id);

        for (int i = 0; i < recommendEquipsData.get_Count(); i++)
        {
            zZhuangBeiPeiZhiBiao equipCfgDataByPos = EquipGlobal.GetEquipCfgDataByPos((EquipLibType.ELT)GodWeaponManager.Instance.EQUIP_TYPE[i]);
            if (equipCfgDataByPos != null)
            {
                this.CreateItem(recommendEquipsData.get_Item(i).id, equipCfgDataByPos.quality >= recommendEquipsData.get_Item(i).quality&& equipCfgDataByPos.step >= recommendEquipsData.get_Item(i).step);
            }
        }
    }
Example #16
0
 private void Add2Channels(int srcChannel, int dstChannels, TalkMsg talkMsg)
 {
     ChatManager.ChatInfo chatInfo = this.GetChatInfo(srcChannel, dstChannels, talkMsg);
     if (chatInfo.sender_uid <= 0L)
     {
         chatInfo.sender_name = TextColorMgr.GetColor("系统消息", "AA0A00", string.Empty);
     }
     if (srcChannel == 32)
     {
         EventDispatcher.Broadcast <ChatManager.ChatInfo>("ChatManager.TeamMessage", chatInfo);
     }
     if (ChatManager.IsVoice(chatInfo))
     {
         this.Add2ChatUI(dstChannels, chatInfo);
         this.Add2ChatTipUI(dstChannels, chatInfo);
     }
     else
     {
         this.SendMessageToBulletCurtain(srcChannel, chatInfo);
         this.Add2ChatUI(dstChannels, chatInfo);
         this.Add2ChatTipUI(dstChannels, chatInfo);
     }
 }
Example #17
0
    private void UpdateSuitForgeContent()
    {
        EquipSimpleInfo wearingEquipSimpleInfoByPos = EquipGlobal.GetWearingEquipSimpleInfoByPos(this.EquipPos);

        if (wearingEquipSimpleInfoByPos != null)
        {
            if (wearingEquipSimpleInfoByPos.suitId <= 0)
            {
                if (EquipGlobal.CheckForgeMaterialIsEnough(wearingEquipSimpleInfoByPos.equipId))
                {
                    this.equipPosTipText.set_text(GameDataUtils.GetChineseContent(510208, false));
                }
                else
                {
                    this.equipPosTipText.set_text(TextColorMgr.GetColor(GameDataUtils.GetChineseContent(510209, false), "ff0000", string.Empty));
                }
            }
            else
            {
                this.equipPosTipText.set_text(TextColorMgr.GetColor(GameDataUtils.GetChineseContent(510207, false), "33beff", string.Empty));
            }
        }
    }
 private void SetPoint(int num)
 {
     this.m_goPointBadge.SetActive(num > 0);
     this.m_lblPointNum.set_text("剩余天赋点:" + TextColorMgr.GetColor(num.ToString(), "28c800", string.Empty));
 }
Example #19
0
 public static string GetContent(int attrId, float value)
 {
     return(AttrUtility.GetAttrName((AttrType)attrId) + TextColorMgr.GetColor(value.ToString(), "A55539", string.Empty));
 }
Example #20
0
    private void RefreshGuildNameLeft()
    {
        bool isMyGuildInSceneLeft = GuildWarManager.Instance.IsMyGuildInSceneLeft;

        if (GuildWarManager.Instance.EnemyGuildWarResourceInfo != null && GuildWarManager.Instance.MyGuildWarResourceInfo != null)
        {
            base.FindTransform("GuildNameTextL").GetComponent <Text>().set_text((!isMyGuildInSceneLeft) ? TextColorMgr.GetColor(GuildWarManager.Instance.EnemyGuildWarResourceInfo.GuildName, "FF4141", string.Empty) : TextColorMgr.GetColor(GuildWarManager.Instance.MyGuildWarResourceInfo.GuildName, "3FCB19", string.Empty));
            base.FindTransform("GuildNameTextR").GetComponent <Text>().set_text(isMyGuildInSceneLeft ? TextColorMgr.GetColor(GuildWarManager.Instance.EnemyGuildWarResourceInfo.GuildName, "FF4141", string.Empty) : TextColorMgr.GetColor(GuildWarManager.Instance.MyGuildWarResourceInfo.GuildName, "3FCB19", string.Empty));
            for (int i = 0; i < this.resourceTransList.get_Count(); i++)
            {
                if (i != 2)
                {
                    Transform transform = this.resourceTransList.get_Item(i).FindChild("ResourceButton");
                    if (!(transform != null) || transform.get_childCount() > 1)
                    {
                    }
                }
            }
        }
    }
    public void Refresh(int itemId)
    {
        (base.get_transform() as RectTransform).set_anchoredPosition(new Vector2(5000f, 5000f));
        this.BtnUseVisibility = false;
        this.ItemLv           = string.Empty;
        Items item = BackpackManager.Instance.GetItem(itemId);

        if (item != null)
        {
            this.ItemFrame = GameDataUtils.GetItemFrame(item.id);
            this.ItemIcon  = GameDataUtils.GetIcon(item.icon);
            this.ItemName  = GameDataUtils.GetItemName(item, true);
            if (item.minLv > EntityWorld.Instance.EntSelf.Lv)
            {
                this.ItemLv = string.Format(GameDataUtils.GetChineseContent(509011, false), item.minLv);
            }
            string color          = TextColorMgr.GetColor(BackpackManager.Instance.OnGetGoodCount(itemId).ToString(), "ff7d4b", string.Empty);
            string chineseContent = GameDataUtils.GetChineseContent(509010, false);
            this.ItemNum        = TextColorMgr.GetColor(string.Format(chineseContent, " " + color), "eccd9b", string.Empty);
            this.ItemProfession = GameDataUtils.GetItemProfession(item);
            if (item.step <= 0)
            {
                this.ItemStepVisibility = false;
            }
            else
            {
                this.ItemStepVisibility = true;
                this.ItemStepText       = string.Format(GameDataUtils.GetChineseContent(505023, false), item.step);
            }
            this.ExcellentCount = item.gogok;
            this.TextItems.Clear();
            List <string> itemAttr = BackpackManager.Instance.GetItemAttr(item);
            if (itemAttr != null)
            {
                GameObject gameObject = GameObject.Find("Attrs");
                if (gameObject != null)
                {
                    gameObject.GetComponent <Image>().set_enabled(true);
                }
                for (int i = 0; i < itemAttr.get_Count(); i++)
                {
                    this.TextItems.Add(new OOItem2Text
                    {
                        Content = TextColorMgr.GetColor(itemAttr.get_Item(i), "ECCD9B", string.Empty)
                    });
                }
            }
            else
            {
                GameObject gameObject2 = GameObject.Find("Attrs");
                if (gameObject2 != null)
                {
                    gameObject2.GetComponent <Image>().set_enabled(false);
                }
            }
            if (item.describeId1 > 0)
            {
                this.Desc = TextColorMgr.GetColor(GameDataUtils.GetChineseContent(item.describeId1, false), "FF7D4B", string.Empty);
            }
            else
            {
                this.Desc = string.Empty;
            }
            if (item.describeId2 > 0)
            {
                this.AttrDesc = TextColorMgr.GetColor(GameDataUtils.GetChineseContent(item.describeId2, false), "5AB9FF", string.Empty);
            }
            else
            {
                this.AttrDesc = string.Empty;
            }
        }
    }
Example #22
0
    public void SetName(ZhuanZhiRenWu dataRW, int count, bool isfinish)
    {
        this.jump = dataRW.uiJump;
        string text = ChangeCareerManager.GetTaskName(dataRW);

        if (dataRW.missionType == 1)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 2)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 3)
        {
            if (dataRW.missionData.get_Count() >= 3)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(2));
            }
        }
        else if (dataRW.missionType == 4)
        {
            if (dataRW.missionData.get_Count() >= 2)
            {
                text += string.Format(dataRW.message1, count, dataRW.missionData.get_Item(1));
            }
        }
        else if (dataRW.missionType == 5)
        {
        }
        text = TextColorMgr.FilterColor(text);
        if (isfinish)
        {
            base.get_transform().FindChild("TaskName").GetComponent <Text>().set_text(TextColorMgr.GetColor(text, "FFC32D", string.Empty));
        }
        else
        {
            base.get_transform().FindChild("TaskName").GetComponent <Text>().set_text(TextColorMgr.GetColor(text, "75523E", string.Empty));
        }
    }