Пример #1
0
    private void ShowAsChannelBlack()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> blacks = FriendManager.Instance.GetBlacks();

        if (blacks.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(blacks.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "黑名单数量:" + color;
            for (int i = 0; i < blacks.get_Count(); i++)
            {
                BuddyInfo        sdata = blacks.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Black, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502084, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "黑名单数量:" + color2;
        }
    }
Пример #2
0
 private void SetDownTime(MailInfo mailInfo)
 {
     this.DownTime = string.Empty;
     if (this.m_TimeCountDown != null)
     {
         if (mailInfo.timeoutSec > 0)
         {
             this.m_TimeCountDown.ResetSeconds(mailInfo.timeoutSec);
         }
         else
         {
             this.m_TimeCountDown.Dispose();
             this.m_TimeCountDown = null;
         }
     }
     else if (mailInfo.timeoutSec > 0)
     {
         this.m_TimeCountDown = new TimeCountDown(mailInfo.timeoutSec, TimeFormat.DHHMM_Chinese, delegate
         {
             if (MailUIViewModel.Instance != null && MailUIViewModel.Instance.get_gameObject().get_activeSelf())
             {
                 string color  = TextColorMgr.GetColor(this.m_TimeCountDown.GetTime(), "ff7d4b", string.Empty);
                 this.DownTime = color + "后自动删除";
             }
         }, delegate
         {
             if (MailUIViewModel.Instance != null && MailUIViewModel.Instance.get_gameObject().get_activeSelf())
             {
                 this.DownTime = string.Empty;
             }
         }, true);
     }
 }
Пример #3
0
    private void ShowAsChannelFriend()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> friends = FriendManager.Instance.GetFriends();

        friends.Sort(new Comparison <BuddyInfo>(FriendUIViewModel.FriendSortCompare));
        string text = DataReader <GlobalParams> .Get("friend_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (friends.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(friends.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color + "/" + text;
            for (int i = 0; i < friends.get_Count(); i++)
            {
                BuddyInfo        sdata = friends.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Friend, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502082, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color2 + "/" + text;
        }
    }
Пример #4
0
    private void ShowAsChannelAsk()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> asks = FriendManager.Instance.GetAsks();
        string           text = DataReader <GlobalParams> .Get("friend_invite_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (asks.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(asks.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color + "/" + text;
            for (int i = 0; i < asks.get_Count(); i++)
            {
                BuddyInfo        sdata = asks.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Ask, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502083, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color2 + "/" + text;
        }
    }
Пример #5
0
    protected override string GetSenderName(int channel, string senderName)
    {
        if (string.IsNullOrEmpty(senderName))
        {
            return(string.Empty);
        }
        string result = string.Empty;

        if (channel != 1)
        {
            if (channel != 8)
            {
                result = senderName;
            }
            else
            {
                result = TextColorMgr.GetColorByID(senderName, 1000007);
            }
        }
        else
        {
            result = senderName;
        }
        return(result);
    }
Пример #6
0
    public void ShowAccessChannels(int itemId, Action closeCallback = null)
    {
        this._ActionClose = closeCallback;
        this.AccessChannelUIItems.Clear();
        Items items = DataReader <Items> .Get(itemId);

        if (items == null)
        {
            return;
        }
        this.ItemIcon   = GameDataUtils.GetIcon(items.icon);
        this.ItemIconBg = GameDataUtils.GetItemFrame(items.id);
        this.ItemName   = GameDataUtils.GetItemName(items, true);
        List <int> getType = items.getType;

        for (int i = 0; i < getType.get_Count(); i++)
        {
            ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(getType.get_Item(i));

            if (zhuXianPeiZhi != null)
            {
                OOAccessChannelUIItem o = new OOAccessChannelUIItem
                {
                    InstanceId = getType.get_Item(i),
                    Icon       = ResourceManager.GetIconSprite("i32300_s"),
                    Title      = GameDataUtils.GetChineseContent(zhuXianPeiZhi.name, false),
                    TitleDesc  = TextColorMgr.GetColor(GameDataUtils.GetChineseContent(DataReader <ZhuXianZhangJiePeiZhi> .Get(zhuXianPeiZhi.chapterId).chapterName, false), "fefedc", string.Empty)
                };
                this.AccessChannelUIItems.Add(o);
            }
        }
    }
Пример #7
0
    private void SetWingPreviewCellL()
    {
        wingLv wingLvInfoPreDifferent = WingManager.GetWingLvInfoPreDifferent(this.m_current_wingId, this.m_wingLvInfoL.lv);

        this.m_goBtnArrowL.SetActive(wingLvInfoPreDifferent.model != this.m_wingLvInfoL.model);
        this.m_WingPreviewCellCurrent.SetRawImage(this.m_wingLvInfoL.model);
        this.m_WingPreviewCellCurrent.SetName(TextColorMgr.GetColorByQuality(this.m_wingLvInfoL.name, this.m_wingLvInfoL.color));
        if (this.m_current_winglevel == 0 || this.m_wingLvInfoL.lv > this.m_current_winglevel)
        {
            this.m_WingPreviewCellCurrent.SetCondition(true, string.Format(GameDataUtils.GetChineseContent(16301, false), this.m_wingLvInfoL.lv));
        }
        else
        {
            this.m_WingPreviewCellCurrent.SetCondition(false, string.Empty);
        }
        if (this.m_current_winglevel == 0 && !WingManager.IsCanActiveWing(this.m_current_wingId))
        {
            wings wingInfo = WingManager.GetWingInfo(this.m_current_wingId);
            this.m_WingPreviewCellCurrent.ShowButtonGet(true);
            this.m_WingPreviewCellCurrent.actionButtonGet = delegate
            {
                this.OnClickBtnGet(wingInfo.activation.get_Item(0).key);
            };
        }
        else
        {
            this.m_WingPreviewCellCurrent.ShowButtonGet(false);
        }
    }
Пример #8
0
    private void SetAttrCurr(int wingId, bool isActivation)
    {
        int    wingLv     = WingManager.GetWingLv(wingId);
        wingLv wingLvInfo = WingManager.GetWingLvInfo(wingId, wingLv);
        Text   component  = base.get_transform().Find("txtName").GetComponent <Text>();

        component.set_text(TextColorMgr.GetColorByQuality(wingLvInfo.name, wingLvInfo.color));
        Image component2 = this.m_btnIcon.GetComponent <Image>();

        ResourceManager.SetSprite(component2, GameDataUtils.GetIcon(wingLvInfo.icon));
        ImageColorMgr.SetImageColor(component2, !isActivation);
        if (wingLv == 0)
        {
            this.m_attrCurr.Find("txtLv").GetComponent <Text>().set_text("激活后");
        }
        else
        {
            this.m_attrCurr.Find("txtLv").GetComponent <Text>().set_text("Lv." + wingLv);
        }
        Attrs attrs = DataReader <Attrs> .Get(wingLvInfo.templateId);

        for (int i = 0; i < 6; i++)
        {
            if (i < attrs.attrs.get_Count())
            {
                Debug.Log(attrs.attrs.get_Item(i) + "=" + (AttrType)attrs.attrs.get_Item(i));
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).get_gameObject().SetActive(true);
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).GetComponent <Text>().set_text(AttrUtility.GetStandardAddDesc(attrs.attrs.get_Item(i), attrs.values.get_Item(i), "ff7d4b"));
            }
            else
            {
                this.m_attrCurr.Find("txtAttrName" + (i + 1)).get_gameObject().SetActive(false);
            }
        }
    }
Пример #9
0
    private float GetHelpTextPreferredWidth(string content)
    {
        Text component = base.FindTransform("ContentHelp").GetComponent <Text>();

        component.set_text(TextColorMgr.FilterColor(content));
        return(component.get_preferredWidth());
    }
Пример #10
0
    private string GetFinalTitle(string title)
    {
        string result    = string.Empty;
        int    actorType = this.actorType;

        switch (actorType)
        {
        case 1:
            result = TextColorMgr.GetColorByID(title, 102);
            return(result);

        case 2:
        case 4:
IL_29:
            if (actorType != 21)
            {
                return(result);
            }
            result = TextColorMgr.GetColorByID(title, 104);
            return(result);

        case 3:
            return(result);

        case 5:
            return(result);
        }
        goto IL_29;
    }
Пример #11
0
 public static string GetColor(string text, string color, string alpha = "")
 {
     if (string.IsNullOrEmpty(color))
     {
         return(text);
     }
     return(TextColorMgr.GetTextWithColor(text, color + alpha));
 }
Пример #12
0
 public static string GetItemNameCustom(Items dataItem, string itemName)
 {
     if (dataItem != null)
     {
         return(TextColorMgr.GetColorByQuality(itemName, dataItem.color));
     }
     return(itemName);
 }
Пример #13
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)));
 }
Пример #14
0
 protected override string GetContent()
 {
     if (this.m_chatInfo.src_channel == 64)
     {
         return(TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502004, false), 210) + this.m_chatInfo.chat_content);
     }
     return(this.m_chatInfo.chat_content);
 }
Пример #15
0
 protected override string GetSenderName(int channel, string senderName)
 {
     if (string.IsNullOrEmpty(senderName))
     {
         return(string.Empty);
     }
     return(TextColorMgr.GetColorByID(senderName + ":", 209));
 }
Пример #16
0
    public void OpenTreasure(int vipLevel, VipXiaoGuo dataVIPEffect)
    {
        if (!TreasureUIViewModel.IsTreasureValid(vipLevel, dataVIPEffect))
        {
            TreasureUIView.Instance.Show(false);
            return;
        }
        UIManagerControl.Instance.OpenUI("TreasureUI", UINodesManager.NormalUIRoot, false, UIType.NonPush);
        this.ObatinItems.Clear();
        this.SpecialItemText = string.Empty;
        this.VIPEffect       = dataVIPEffect;
        this.VIPLevel10      = GameDataUtils.GetNumIcon10(vipLevel, NumType.Yellow_light);
        this.VIPLevel1       = GameDataUtils.GetNumIcon1(vipLevel, NumType.Yellow_light);
        this.BtnOKText       = GameDataUtils.GetChineseContent(508009, false);
        if (dataVIPEffect.value2 > 0 && dataVIPEffect.value3 > 0)
        {
            this.ConsumeOn   = true;
            this.ConsumeIcon = GameDataUtils.GetItemIcon(dataVIPEffect.value2);
            this.ConsumeNum  = dataVIPEffect.value3.ToString();
        }
        else
        {
            this.ConsumeOn = false;
        }
        string text = string.Empty;
        List <VipBoxItemInfo> vIPBox = VIPManager.Instance.GetVIPBox(dataVIPEffect.effect);

        if (vIPBox != null)
        {
            for (int i = 0; i < vIPBox.get_Count(); i++)
            {
                VipBoxItemInfo vipBoxItemInfo = vIPBox.get_Item(i);
                if (SpecialItem.IsSpecial(vipBoxItemInfo.itemId))
                {
                    string colorByID = TextColorMgr.GetColorByID("x" + vipBoxItemInfo.itemCount, 405);
                    if (string.IsNullOrEmpty(text))
                    {
                        text = GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID;
                    }
                    else
                    {
                        text = text + ", " + GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID;
                    }
                }
                else
                {
                    OOItem2Draw oOItem2Draw = new OOItem2Draw();
                    oOItem2Draw.ID       = vipBoxItemInfo.itemId;
                    oOItem2Draw.ItemIcon = GameDataUtils.GetItemIcon(vipBoxItemInfo.itemId);
                    oOItem2Draw.ItemName = Utils.GetItemNum(vipBoxItemInfo.itemId, (long)vipBoxItemInfo.itemCount);
                    this.ObatinItems.Add(oOItem2Draw);
                }
            }
        }
        this.SpecialItemText = text;
    }
Пример #17
0
    public void InitWithMaxLv(int wingId)
    {
        this.Init(wingId);
        this.mWingPreviewCell.SetCondition(true, "已获得最高级");
        wings  wingInfo   = WingManager.GetWingInfo(wingId);
        int    wingLv     = WingManager.GetWingLv(wingId);
        wingLv wingLvInfo = WingManager.GetWingLvInfo(wingId, wingLv);

        this.mWingPreviewCell.SetName(TextColorMgr.GetColorByQuality(wingLvInfo.name, wingLvInfo.color));
    }
Пример #18
0
 public void SetName(int actorType, long uuid, int level, string name, int quality)
 {
     this.SetNameFollowCache(actorType, uuid, TextColorMgr.GetColorByQuality(string.Concat(new object[]
     {
         "LV.",
         level,
         " ",
         name
     }), quality));
 }
Пример #19
0
    public static string GetBlank(int count)
    {
        string text = string.Empty;

        for (int i = 0; i < count; i++)
        {
            text += ChatManager.Blank;
        }
        return(TextColorMgr.GetColorByID(text, 301, 0f));
    }
 private void SetColor()
 {
     if (BulletCurtainManager.Instance.IsRandomColor)
     {
         string text = this.m_lblContent.get_text();
         text = TextColorMgr.FilterColor(text);
         int quality = Random.Range(1, 7);
         text = TextColorMgr.GetColorByQuality(text, quality, BulletCurtainManager.Instance.Alpha);
         this.m_lblContent.set_text(text);
     }
 }
Пример #21
0
    protected override void InitUI()
    {
        base.FindTransform("BtnExitName").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(501002, false));
        string colorByID = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(501003, false), 405);

        base.FindTransform("RewardsName").GetComponent <Text>().set_text(colorByID);
        this.m_lblExpNum       = base.FindTransform("ExpNum").GetComponent <Text>();
        this.m_lblGoldNum      = base.FindTransform("GoldNum").GetComponent <Text>();
        this.m_tranItemsRegion = base.FindTransform("ItemsRegion");
        this.m_tranItemsRegion.get_gameObject().SetActive(false);
    }
Пример #22
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));
     }
 }
Пример #23
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));
 }
Пример #24
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));
 }
Пример #25
0
 public static string GetItemName(Items dataItem, bool colorShow = true)
 {
     if (dataItem == null)
     {
         return(string.Empty);
     }
     if (colorShow)
     {
         return(TextColorMgr.GetColorByQuality(GameDataUtils.GetChineseContent(dataItem.name, false), dataItem.color));
     }
     return(GameDataUtils.GetChineseContent(dataItem.name, false));
 }
Пример #26
0
    private void OnClickDecompose(GameObject go)
    {
        if (EntityWorld.Instance.EntSelf == null)
        {
            return;
        }
        if (!GuildManager.Instance.IsGuildCaptain(EntityWorld.Instance.EntSelf.ID))
        {
            UIManagerControl.Instance.ShowToastText("只有团长才能操作");
            return;
        }
        List <MultiCheckUIViewModel.ItemData> list = new List <MultiCheckUIViewModel.ItemData>();

        list.Add(new MultiCheckUIViewModel.ItemData
        {
            id   = 1,
            name = TextColorMgr.GetColorByQuality("橙色两勾玉", 5),
            isOn = false
        });
        list.Add(new MultiCheckUIViewModel.ItemData
        {
            id   = 2,
            name = TextColorMgr.GetColorByQuality("橙色三勾玉", 5),
            isOn = false
        });
        list.Add(new MultiCheckUIViewModel.ItemData
        {
            id   = 3,
            name = TextColorMgr.GetColorByQuality("金色两勾玉", 6),
            isOn = false
        });
        list.Add(new MultiCheckUIViewModel.ItemData
        {
            id   = 4,
            name = TextColorMgr.GetColorByQuality("金色三勾玉", 6),
            isOn = false
        });
        MultiCheckUIViewModel.Instance.ShowAsConfirm("批量选择", list, delegate
        {
            List <int> list2 = new List <int>();
            for (int i = 1; i <= 3; i++)
            {
                if (MultiCheckUIViewModel.Instance.IsOn(i))
                {
                    list2.Add(i);
                }
            }
            this.selectDecomposeEquips = GuildStorageManager.Instance.GetSelectDecomposeEquips(list2);
            this.SetSelectBagCheck();
            this.SetBtnsVisible(true);
        }, GameDataUtils.GetChineseContent(505114, false), "button_orange_1", UINodesManager.MiddleUIRoot, GameDataUtils.GetChineseContent(621607, false));
    }
    private void SetRemainTime(int seconds)
    {
        string time = TimeConverter.GetTime(seconds, TimeFormat.HHMMSS);

        if (seconds > 0)
        {
            this.m_lblTimeNum.set_text(time);
        }
        else
        {
            this.m_lblTimeNum.set_text(TextColorMgr.GetColorByID(time, 1000007));
        }
    }
Пример #28
0
 public float GetPreferredHeigth(string text, int fontSize, bool filterColor)
 {
     ChatManager.mFontTool.set_fontSize(fontSize);
     if (filterColor)
     {
         ChatManager.mFontTool.set_text(TextColorMgr.FilterColor(text));
     }
     else
     {
         ChatManager.mFontTool.set_text(text);
     }
     return(ChatManager.mFontTool.get_preferredHeight());
 }
 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));
 }
Пример #30
0
    private string GetBroadcastContent(ChatManager.ChatInfo chatInfo)
    {
        string channelNameWithColor = ChatManager.GetChannelNameWithColor(chatInfo.src_channel);
        string text = string.Empty;

        if (!string.IsNullOrEmpty(chatInfo.sender_name))
        {
            text = TextColorMgr.GetColorByID(chatInfo.sender_name + ":", 209);
        }
        string text2 = channelNameWithColor + text;
        string text3 = this.BroadcastContentSplit(chatInfo.chat_content, chatInfo.items);

        return(text2 + text3);
    }