private void Draw_Item_List()
    {
        this.m_ListBox_ListBox37.SelectIndex = -1;
        this.m_ListBox_ListBox37.Clear();
        int count = this.m_ItemList.Count;

        if (count > 0)
        {
            int num  = 0;
            int num2 = 0;
            Protocol_COMMON.Page_Setting(count, 7, ref this.m_nCurrentPage, ref this.m_nMaxPage, out num, out num2);
            for (int i = num; i < num2; i++)
            {
                ListItem listItem = new ListItem();
                listItem.Key = this.m_ItemList[i];
                int nItemUnique = this.m_ItemList[i].m_nItemUnique;
                listItem.SetColumnGUIContent(0, string.Empty, "Win_T_ItemEmpty");
                UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(nItemUnique);

                listItem.SetColumnGUIContent(1, string.Empty, itemTexture, this.m_ItemList[i]);
                string name = NrTSingleton <ItemManager> .Instance.GetName(this.m_ItemList[i]);

                listItem.SetColumnStr(2, name, string.Empty);
                this.m_ListBox_ListBox37.Add(listItem);
            }
            this.m_ListBox_ListBox37.RepositionItems();
        }
        this.m_Label_Page.Text = this.m_nCurrentPage + " / " + this.m_nMaxPage;
    }
        private void SolOtherInfo(NkListSolInfo solInfo)
        {
            if (solInfo.ShowCombat)
            {
                UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_BattlePower");

                if (uIBaseInfoLoader != null)
                {
                    this.downText.Visible = true;
                    this.downText.SetTexture(uIBaseInfoLoader);
                    this.downText.SetSize(this.width, uIBaseInfoLoader.UVs.height);
                    this.downText.gameObject.transform.localPosition = new Vector3(0f, 0f, -0.02f);
                    this.downText.SetAnchor(SpriteText.Anchor_Pos.Upper_Left);
                    this.downText.SetAlignment(SpriteText.Alignment_Type.Left);
                    this.downText.spriteText.gameObject.transform.localPosition = new Vector3(24f, -2f, -0.02f);
                    this.downText.SetCharacterSize(20f);
                    this.downText.Text = solInfo.FightPower.ToString();
                }
            }
            else if (solInfo.ShowLevel)
            {
                this.downText.Visible = true;
                this.downText.SetAnchor(SpriteText.Anchor_Pos.Upper_Left);
                this.downText.SetAlignment(SpriteText.Alignment_Type.Left);
                this.downText.SetSize(this.width, this.fontSize);
                this.downText.gameObject.transform.localPosition            = new Vector3(0f, 0f, -0.02f);
                this.downText.spriteText.gameObject.transform.localPosition = new Vector3(2f, -2f, -0.02f);
                this.downText.Text = NrTSingleton <UIDataManager> .Instance.GetString("Lv ", solInfo.SolLevel.ToString());
            }
        }
Exemple #3
0
    public BATTLESKILL_BASE SetSkillIcon()
    {
        if (this.m_kSelectCharKindInfo == null)
        {
            return(null);
        }
        SOL_GUIDE solGuild = NrTSingleton <NrTableSolGuideManager> .Instance.GetSolGuild(this.m_kSelectCharKindInfo.GetCharKind());

        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(solGuild.m_i32SkillUnique);

        if (this.m_DrawTextureSkillIcon != null)
        {
            if (battleSkillBase != null)
            {
                UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique);

                this.m_DrawTextureSkillIcon.SetTexture(battleSkillIconTexture);
            }
            else
            {
                this.m_DrawTextureSkillIcon.SetTexture(string.Empty);
            }
        }
        return(battleSkillBase);
    }
        public void SetItemTexture(int ItemUnique, int MInLevel, bool isMinLevelShow = true, float ResizeRate = 1f)
        {
            base.SetTexture(MsgHandler.HandleReturn <UIBaseInfoLoader>("GetItemTexture", new object[]
            {
                ItemUnique
            }));
            this.downText.Text = string.Empty;
            this.upText.Text   = string.Empty;
            UIBaseInfoLoader uIBaseInfoLoader = MsgHandler.HandleReturn <UIBaseInfoLoader>("GetLegendItemGrade", new object[]
            {
                ItemUnique
            });

            if (uIBaseInfoLoader != null)
            {
                this.upText.SetSize(uIBaseInfoLoader.UVs.width * ResizeRate, uIBaseInfoLoader.UVs.height * ResizeRate);
                this.upText.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
                this.upText.SetTexture(uIBaseInfoLoader);
                this.upText.DeleteSpriteText();
                if (isMinLevelShow)
                {
                    this.downText.Visible = true;
                    this.downText.SetCharacterSize(20f);
                    this.downText.Text = NrTSingleton <UIDataManager> .Instance.GetString("Lv.", MInLevel.ToString());

                    this.downText.gameObject.transform.localPosition = new Vector3(0f, -(this.height - this.fontSize - 2f), -0.02f);
                }
            }
        }
Exemple #5
0
    private void SetButtonImage(UIBaseInfoLoader kBaseInfo)
    {
        base.SetSpriteTile(kBaseInfo.Tile, kBaseInfo.UVs.width / (float)kBaseInfo.ButtonCount, kBaseInfo.UVs.height);
        this.m_bPattern = kBaseInfo.Pattern;
        Material material = (Material)CResources.Load(kBaseInfo.Material);

        base.Setup(this.width, this.height, material);
        float pixelToUVsWidth = this.GetPixelToUVsWidth(material, kBaseInfo.UVs.width / (float)kBaseInfo.ButtonCount);
        Rect  rect            = new Rect(this.GetPixelToUVsWidth(material, kBaseInfo.UVs.x) - pixelToUVsWidth, 1f - this.GetPixelToUVsHeight(material, kBaseInfo.UVs.y + kBaseInfo.UVs.height), pixelToUVsWidth, this.GetPixelToUVsHeight(material, kBaseInfo.UVs.height));
        Rect  uvs             = new Rect(rect);

        uvs.x += pixelToUVsWidth;
        for (int i = 0; i < 4; i++)
        {
            this.States[i].spriteFrames    = new CSpriteFrame[1];
            this.States[i].spriteFrames[0] = new CSpriteFrame();
            rect.x += pixelToUVsWidth;
            if ((int)kBaseInfo.ButtonCount <= i)
            {
                this.States[i].spriteFrames[0].uvs = uvs;
            }
            else
            {
                this.States[i].spriteFrames[0].uvs = rect;
            }
            this.animations[i] = new UVAnimation();
            this.animations[i].SetAnim(this.States[i], i);
        }
        base.PlayAnim(0, 0);
    }
    public void SetSolierTexutre(EVENT_HERODATA _EventHero, int iSolIndex, NkSoldierInfo pkSolInfo)
    {
        if (_EventHero != null)
        {
            if (this.Info_mode == 1)
            {
                this.m_DrawTexture_Slot[iSolIndex].SetTexture("Win_I_EventSol");
            }
            if (this.Info_mode == 0)
            {
                this.m_DrawTexture_Slot2[iSolIndex].SetTexture("Win_I_EventSol");
            }
            this.m_dtSlot[this.Info_mode][iSolIndex].SetSolImageTexure(eCharImageType.SMALL, this.GetListSolInfo(pkSolInfo));
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(pkSolInfo.GetCharKind(), (int)pkSolInfo.GetGrade());

            if (legendFrame != null)
            {
                if (this.Info_mode == 1)
                {
                    this.m_DrawTexture_Slot[iSolIndex].SetTexture(legendFrame);
                }
                if (this.Info_mode == 0)
                {
                    this.m_DrawTexture_Slot2[iSolIndex].SetTexture(legendFrame);
                }
            }
            this.m_dtSlot[this.Info_mode][iSolIndex].SetSolImageTexure(eCharImageType.SMALL, this.GetListSolInfo(pkSolInfo));
        }
    }
Exemple #7
0
    public void SetupBalck_BG(string imagekey, float x, float y, float w, float h)
    {
        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(imagekey);

        if (uIBaseInfoLoader == null)
        {
            return;
        }
        base.BLACK_BG            = Box.Create("Win_T_BK", new Vector3(0f, 0f, 0.1f));
        base.BLACK_BG.autoResize = true;
        base.BLACK_BG.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
        base.BLACK_BG.gameObject.layer = GUICamera.UILayer;
        BoxCollider boxCollider = (BoxCollider)base.BLACK_BG.gameObject.AddComponent(typeof(BoxCollider));

        if (null != boxCollider)
        {
            boxCollider.size   = new Vector3(GUICamera.width, GUICamera.height, 0f);
            boxCollider.center = new Vector3(GUICamera.width / 2f, -GUICamera.height / 2f, 0f);
        }
        base.InteractivePanel.MakeChild(base.BLACK_BG.gameObject);
        base.BLACK_BG.transform.localPosition = new Vector3(-base.GetLocation().x, -base.GetLocation().y, 0.1f);
        base.BLACK_BG.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height);
        base.BLACK_BG.m_bPattern = uIBaseInfoLoader.Pattern;
        Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);

        base.BLACK_BG.Setup(w, h, material);
        base.BLACK_BG.SetTextureUVs(new Vector2(uIBaseInfoLoader.UVs.x, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), new Vector2(uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height));
        base.BLACK_BG.SetColor(new Color(1f, 1f, 1f, 0.8f));
    }
    private void _LinkItemData()
    {
        foreach (Battle_ResultMineDlg.BATTLE_RESULT_ITEM_REWARD_INFO current in this.m_ItemList)
        {
            NewListItem      newListItem = new NewListItem(this.m_lbItemList.ColumnNum, true, string.Empty);
            UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(current.m_nItemUnique);

            newListItem.SetListItemData(0, itemTexture, null, null, null);
            string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(current.m_nItemUnique);

            newListItem.SetListItemData(1, itemNameByItemUnique, null, null, null);
            int    nItemNum = current.m_nItemNum;
            string text     = Protocol_Item.Money_Format((long)nItemNum) + NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442");

            if (current.m_nBonusItemNum > 0)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2967"),
                    "count",
                    current.m_nBonusItemNum
                });

                text += empty;
            }
            newListItem.SetListItemData(2, text, null, null, null);
            this.m_lbItemList.Add(newListItem);
        }
        this.m_lbItemList.RepositionItems();
    }
        public static DrawTexture DrawTexture(string name, string imageKey, float width, float height, bool useBox)
        {
            DrawTexture result;

            using (new ScopeProfile("UICreateControl - DrawTexture"))
            {
                UIBaseInfoLoader uIBaseInfoLoader = UIBaseFileManager.FindUIImageDictionary(name, imageKey);
                if (uIBaseInfoLoader == null)
                {
                    result = null;
                }
                else
                {
                    GameObject  gameObject  = new GameObject(name);
                    DrawTexture drawTexture = gameObject.AddComponent <DrawTexture>();
                    drawTexture.autoResize       = false;
                    drawTexture.gameObject.layer = GUICamera.UILayer;
                    drawTexture.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
                    drawTexture.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height);
                    drawTexture.m_bPattern = uIBaseInfoLoader.Pattern;
                    Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);
                    drawTexture.Setup(width, height, material);
                    drawTexture.SetTextureUVs(new Vector2(uIBaseInfoLoader.UVs.x, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), new Vector2(uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height));
                    drawTexture.Start();
                    drawTexture.UsedCollider(useBox);
                    result = drawTexture;
                }
            }
            return(result);
        }
 public UIEmoticonInfo()
 {
     this.infoLoader = new UIBaseInfoLoader();
     this.delays[0]  = 0f;
     this.delays[1]  = 0f;
     this.delays[2]  = 0f;
 }
    public UIBaseInfoLoader GetBattleSkillBuffImmuneIconTexture(int nImmuneType)
    {
        string skillIconCode = "187";

        if (nImmuneType == 32768)
        {
            skillIconCode = "196";
        }
        BATTLESKILL_ICON battleSkillIcon = this.GetBattleSkillIcon(skillIconCode);

        if (battleSkillIcon == null)
        {
            return(null);
        }
        if (this.m_dicUILoader.ContainsKey(battleSkillIcon.m_nSkillIconIndex))
        {
            return(this.m_dicUILoader[battleSkillIcon.m_nSkillIconIndex]);
        }
        string           strSkillIconFile = battleSkillIcon.m_strSkillIconFile;
        int              nSkillIconIndex  = battleSkillIcon.m_nSkillIconIndex;
        UIBaseInfoLoader uIBaseInfoLoader = new UIBaseInfoLoader();

        uIBaseInfoLoader.Tile     = SpriteTile.SPRITE_TILE_MODE.STM_MIN;
        uIBaseInfoLoader.Material = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <UIDataManager> .Instance.FilePath, "Material/BattleSkill_Icon/", strSkillIconFile + NrTSingleton <UIDataManager> .Instance.AddFilePath);

        float left = (float)(nSkillIconIndex % 20) * 51f;
        float top  = (float)(nSkillIconIndex / 20) * 51f;

        uIBaseInfoLoader.UVs = new Rect(left, top, 50f, 50f);
        this.m_dicUILoader.Add(battleSkillIcon.m_nSkillIconIndex, uIBaseInfoLoader);
        return(uIBaseInfoLoader);
    }
Exemple #12
0
    public void SetCharImg(byte bGrade, string costumePortraitPath = "")
    {
        if (this.m_kSelectCharKindInfo == null)
        {
            return;
        }
        this.SetSeason(bGrade);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(this.m_kSelectCharKindInfo.GetCharKind(), (int)bGrade, this.m_kSelectCharKindInfo.GetName());

        this.m_Label_Character_Name.SetText(legendName);
        short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(this.m_kSelectCharKindInfo.GetCharKind(), (int)bGrade);

        this.m_DrawTexture_Character.SetTextureEffect(eCharImageType.LARGE, this.m_kSelectCharKindInfo.GetCharKind(), (int)bGrade, costumePortraitPath);
        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(this.m_kSelectCharKindInfo.GetCharKind(), (int)bGrade);

        if (0 < legendType)
        {
            this.m_DrawTexture_rank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
        }
        this.m_DrawTexture_rank.SetTexture(solLargeGradeImg);
        if (this.m_DrawTextureWeapon != null)
        {
            int weaponType = this.m_kSelectCharKindInfo.GetWeaponType();
            this.m_DrawTextureWeapon.SetTexture(string.Format("Win_I_Weapon{0}", weaponType.ToString()));
        }
    }
        public static TextField TextField(string name, string str, bool multiLine, float maxWidth, float height, float fontSize, SpriteText.Font_Effect fontEffect, SpriteText.Anchor_Pos anchor, string fontColor)
        {
            GameObject gameObject = new GameObject(name);
            TextField  textField  = gameObject.AddComponent <TextField>();

            if (null == textField)
            {
                return(null);
            }
            textField.customCollider   = false;
            textField.gameObject.layer = GUICamera.UILayer;
            textField.width            = maxWidth;
            textField.height           = height;
            textField.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            textField.includeTextInAutoCollider = false;
            textField.DefaultTextAnchor         = anchor;
            if (anchor == SpriteText.Anchor_Pos.Upper_Left || (anchor == SpriteText.Anchor_Pos.Middle_Left | anchor == SpriteText.Anchor_Pos.Lower_Left))
            {
                textField.DefaultTextAlignment = SpriteText.Alignment_Type.Left;
            }
            else if (anchor == SpriteText.Anchor_Pos.Upper_Center || (anchor == SpriteText.Anchor_Pos.Middle_Center | anchor == SpriteText.Anchor_Pos.Lower_Center))
            {
                textField.DefaultTextAlignment = SpriteText.Alignment_Type.Center;
            }
            if (anchor == SpriteText.Anchor_Pos.Upper_Right || anchor == SpriteText.Anchor_Pos.Middle_Right || anchor == SpriteText.Anchor_Pos.Lower_Right)
            {
                textField.DefaultTextAlignment = SpriteText.Alignment_Type.Right;
            }
            textField.fontSize  = fontSize;
            textField.multiLine = multiLine;
            textField.maxWidth  = maxWidth;
            UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Com_I_Transparent");

            textField.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height);
            textField.m_bPattern = uIBaseInfoLoader.Pattern;
            Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);

            textField.Setup(maxWidth, height, material);
            textField.States[0].spriteFrames    = new CSpriteFrame[1];
            textField.States[0].spriteFrames[0] = new CSpriteFrame();
            Rect rect = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.x), 1f - UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.width), UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.height));

            textField.States[0].spriteFrames[0].uvs = rect;
            textField.SetUVs(rect);
            textField.autoResize                = false;
            textField.anchor                    = SpriteRoot.ANCHOR_METHOD.UPPER_LEFT;
            textField.States[1].spriteFrames    = new CSpriteFrame[1];
            textField.States[1].spriteFrames[0] = new CSpriteFrame();
            Rect uvs = new Rect(0f, 0f, 1f, 1f);

            textField.States[1].spriteFrames[0].uvs = uvs;
            textField.CreateSpriteText();
            textField.ColorText = fontColor;
            textField.SetCharacterSize(fontSize);
            textField.SetFontEffect(fontEffect);
            textField.Text = str;
            textField.Start();
            return(textField);
        }
Exemple #14
0
    private void SetSolInitiativeColum(NkSoldierInfo LastSolInfo, NkSoldierInfo NowSolInfo, int index, ref NewListItem item, ref int ShowIndex)
    {
        string empty = string.Empty;

        if (LastSolInfo != null && LastSolInfo.GetInitiativeValue() != NowSolInfo.GetInitiativeValue())
        {
            ShowIndex = index + 1;
        }
        EVENT_HERODATA eventHeroCheck = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCheck(NowSolInfo.GetCharKind(), NowSolInfo.GetGrade());

        if (eventHeroCheck != null)
        {
            item.SetListItemData(1, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(NowSolInfo.GetCharKind(), (int)NowSolInfo.GetGrade());

            if (legendFrame != null)
            {
                item.SetListItemData(1, legendFrame, null, null, null);
            }
            else
            {
                item.SetListItemData(1, "Win_I_Cancel", null, null, null);
            }
        }
        item.SetListItemData(5, ShowIndex.ToString(), NowSolInfo.GetInitiativeValue(), null, null);
        item.SetListItemData(4, NowSolInfo.GetListSolInfo(true), NowSolInfo, null, null);
        item.SetListItemData(2, NowSolInfo.GetName(), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            NowSolInfo.GetLevel().ToString(),
            "count2",
            NowSolInfo.GetSolMaxLevel().ToString()
        });

        item.SetListItemData(3, empty, null, null, null);
        item.SetListItemData(8, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeDown), null);
        item.SetListItemData(9, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeUP), null);
        item.SetListItemData(11, NowSolInfo.GetInitiativeValue().ToString(), null, null, null);
        float num = 0f;

        if (NowSolInfo.GetInitiativeValue() >= 0)
        {
            num = (float)NowSolInfo.GetInitiativeValue() / 100f;
            this.m_oldHSInittiativeValue.Add(num);
        }
        item.SetFloatListItemData(12, num, index, new EZValueChangedDelegate(this.OnMoveSlider), null);
        int charKind = 0;

        if (NowSolInfo.IsAtbCommonFlag(8L))
        {
            charKind = 1;
        }
        item.SetListItemData(13, charKind, index, new EZValueChangedDelegate(this.ClickOnlySkillCheckBox), null);
    }
Exemple #15
0
 public void SetButtonTextureKey(UIBaseInfoLoader kBaseInfo)
 {
     if (kBaseInfo == null)
     {
         return;
     }
     this.SetButtonImage(kBaseInfo);
 }
    public void SetDataForBattle(NkSoldierInfo pkSolinfo, int skillunique, int skillLevel)
    {
        if (pkSolinfo == null)
        {
            return;
        }
        if (skillunique <= 0 || skillLevel <= 0)
        {
            return;
        }
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(skillunique);

        BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(skillunique, skillLevel);

        if (battleSkillBase == null || battleSkillDetail == null)
        {
            return;
        }
        string           empty = string.Empty;
        UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique);

        this.SkillTargetIcon.SetTexture(battleSkillIconTexture);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1293"),
            "skillname",
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey)
        });

        this.SkillTargetName.Text = empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1885"),
            "skilllevel",
            skillLevel.ToString()
        });

        this.SkillTargetLevel.Text = empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1868"),
            "skilllevel",
            skillLevel.ToString()
        });

        this.SkillCurrentLevel.Text = empty;
        NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, pkSolinfo, -1);

        this.SkillCurrentExplain.SetScrollLabel(empty);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2153"),
            "count",
            battleSkillDetail.m_nSkillNeedAngerlyPoint.ToString()
        });

        this.SkillAngerlyPoint.Text = empty;
    }
        public static UIRadioBtn RadioBtn(Form form, string name, string imageKey, float width, float height)
        {
            UIBaseInfoLoader uIBaseInfoLoader = UIBaseFileManager.FindUIImageDictionary(name, imageKey);

            if (uIBaseInfoLoader == null)
            {
                return(null);
            }
            GameObject gameObject = new GameObject(name);
            UIRadioBtn uIRadioBtn = gameObject.AddComponent <UIRadioBtn>();

            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            uIRadioBtn.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height);
            uIRadioBtn.m_bPattern = uIBaseInfoLoader.Pattern;
            Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);

            uIRadioBtn.Setup(width, height, material);
            float pixelToUVsWidth = UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount);
            Rect  uvs             = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.x) - pixelToUVsWidth, 1f - UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), pixelToUVsWidth, UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.height));

            for (int i = 0; i <= (int)(uIBaseInfoLoader.ButtonCount - 1); i++)
            {
                uIRadioBtn.States[i].spriteFrames    = new CSpriteFrame[1];
                uIRadioBtn.States[i].spriteFrames[0] = new CSpriteFrame();
                uvs.x += pixelToUVsWidth;
                uIRadioBtn.States[i].spriteFrames[0].uvs = uvs;
                uIRadioBtn.animations[i].SetAnim(uIRadioBtn.States[i], i);
            }
            uIRadioBtn.autoResize           = false;
            uIRadioBtn.useParentForGrouping = false;
            uIRadioBtn.SetGroup(100 * form.WindowID);
            form.AddDictionaryControl(name, uIRadioBtn);
            form.InteractivePanel.MakeChild(uIRadioBtn.gameObject);
            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            UIButton uIButton = UICreateControl.Button(name + "OverButton", imageKey + "_over", uIRadioBtn.width, uIRadioBtn.height);

            if (null != uIButton)
            {
                uIButton.Start();
                BoxCollider component = uIButton.gameObject.GetComponent <BoxCollider>();
                if (null != component)
                {
                    UnityEngine.Object.Destroy(component);
                }
                form.InteractivePanel.MakeChild(uIButton.gameObject);
                uIRadioBtn.layers = new SpriteRoot[1];
                for (int j = 0; j < 1; j++)
                {
                    uIRadioBtn.layers[j]             = uIButton;
                    uIButton.transform.localPosition = uIRadioBtn.GetLocation();
                }
            }
            uIRadioBtn.Start();
            return(uIRadioBtn);
        }
Exemple #18
0
    public void SetSpriteTile(string strUIKey)
    {
        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(strUIKey);

        if (uIBaseInfoLoader != null)
        {
            this.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height);
        }
    }
Exemple #19
0
    private UIBaseInfoLoader GetLoaderImg(string Key)
    {
        UIBaseInfoLoader uIBaseInfoLoader = new UIBaseInfoLoader();

        uIBaseInfoLoader.Tile = SpriteTile.SPRITE_TILE_MODE.STM_3x3;
        NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(Key, ref uIBaseInfoLoader);

        return(uIBaseInfoLoader);
    }
 public void Set(UIBaseInfoLoader baseInfoLoader)
 {
     this.eTile          = baseInfoLoader.eTile;
     this.szMaterial     = baseInfoLoader.szMaterial;
     this.rUVs           = baseInfoLoader.rUVs;
     this.bytButtonCount = baseInfoLoader.bytButtonCount;
     this.m_bPattern     = baseInfoLoader.m_bPattern;
     this.styleName      = baseInfoLoader.styleName;
 }
Exemple #21
0
    private void SetSkillIcon(int skillUnique)
    {
        UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(skillUnique);

        if (battleSkillIconTexture == null)
        {
            return;
        }
        this._skillInfoSkillImage.SetTexture(battleSkillIconTexture);
    }
Exemple #22
0
    public void SetButtonTextureKey(string key)
    {
        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(key);

        if (uIBaseInfoLoader == null)
        {
            return;
        }
        this.SetButtonImage(uIBaseInfoLoader);
    }
 public void SetListItemData(int index, UIBaseInfoLoader loader, object data = null, EZValueChangedDelegate eventDelegate = null, EZValueChangedDelegate downDelegate = null)
 {
     if (0 <= index && this.m_nMaxCoulmnNum > index)
     {
         this.m_itemDataList[index].realData      = loader;
         this.m_itemDataList[index].data          = data;
         this.m_itemDataList[index].eventDelegate = eventDelegate;
         this.m_itemDataList[index].downDelegate  = downDelegate;
     }
 }
        public void InitViewCostumeGuide(CostumeGuide_Dlg owner, COSTUMEGUIDE_SLOT[] slotList, List <SolSlotData> seasonSlotDataList, byte page)
        {
            this.ClearCostumeSlots(ref slotList);
            if (seasonSlotDataList == null || slotList == null)
            {
                return;
            }
            int num   = (int)((page - 1) * 27);
            int count = seasonSlotDataList.Count;

            owner._maxPage = (byte)(count / 27);
            if (count % 27 > 0)
            {
                owner._maxPage += 1;
            }
            for (int i = 0; i < 27; i++)
            {
                if (seasonSlotDataList.Count <= num)
                {
                    break;
                }
                NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(seasonSlotDataList[num].i32KindInfo);

                if (charKindInfo != null)
                {
                    slotList[i].IT_Slot.SetSolImageTexure(eCharImageType.SMALL, charKindInfo.GetCharKind(), (int)(seasonSlotDataList[num].bSolGrade - 1));
                }
                else
                {
                    slotList[i].IT_Slot.SetTexture("Win_T_ItemEmpty");
                }
                slotList[i].DT_BlackSlot.Hide(true);
                bool flag = NrTSingleton <NrCharCostumeTableManager> .Instance.IsNewCostumeExistByCode(charKindInfo.GetCode());

                slotList[i].Box_New.Hide(!flag);
                slotList[i].DT_Event.Hide(true);
                UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(charKindInfo.GetCharKind(), (int)seasonSlotDataList[num].bSolGrade);

                if (legendFrame != null)
                {
                    slotList[i].DT_Slot.SetTexture(legendFrame);
                }
                else
                {
                    slotList[i].DT_Slot.SetTexture("Win_T_ItemEmpty");
                }
                if (charKindInfo != null)
                {
                    slotList[i].BT_Slot.Data = charKindInfo.GetCharKind();
                }
                num++;
            }
            owner.ChangePageText();
        }
Exemple #25
0
        private bool SetSkillIcon(int skillUnique)
        {
            UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(skillUnique);

            if (battleSkillIconTexture == null)
            {
                return(false);
            }
            this._owner._variables._skillIcon.SetTexture(battleSkillIconTexture);
            return(true);
        }
    public void Setup(float w, float h, string strUIKey)
    {
        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(strUIKey);

        if (uIBaseInfoLoader != null)
        {
            base.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height);
            Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);
            this.Setup(w, h, new Vector2(uIBaseInfoLoader.UVs.x, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), new Vector2(uIBaseInfoLoader.UVs.width, uIBaseInfoLoader.UVs.height), material);
        }
    }
Exemple #27
0
 public bool SetColumnGUIContent(int index, string str, UIBaseInfoLoader image, string color)
 {
     if (ListItem.MAX_COLUMN_NUM <= index)
     {
         return(false);
     }
     this.columnStr[index]       = color + str;
     this.columnImageInfo[index] = image;
     this.type[index]            = ListItem.TYPE.IMAGE;
     return(true);
 }
        public void SetItemTexture(string imageKey1, float width, float height)
        {
            UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(imageKey1);

            if (uIBaseInfoLoader != null)
            {
                this.upText.SetSize(width, height);
                this.upText.SetTexture(uIBaseInfoLoader);
                this.upText.DeleteSpriteText();
            }
        }
Exemple #29
0
    private NewListItem GetTranScendenceMaterialSolItem(NkSoldierInfo solInfo, bool visibleCloseButton)
    {
        if (solInfo == null || this.GetListBox() == null)
        {
            return(null);
        }
        NewListBox       listBox     = this.GetListBox();
        NewListItem      newListItem = new NewListItem(listBox.ColumnNum, true, string.Empty);
        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(solInfo.GetCharKind(), (int)solInfo.GetGrade());

        if (legendFrame != null)
        {
            newListItem.SetListItemData(0, legendFrame, null, null, null);
        }
        newListItem.SetListItemData(1, solInfo.GetListSolInfo(false), null, null, null);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(solInfo.GetCharKind(), (int)solInfo.GetGrade(), solInfo.GetName());

        newListItem.SetListItemData(2, legendName, null, null, null);
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "count1",
            solInfo.GetLevel(),
            "count2",
            solInfo.GetSolMaxLevel()
        });

        newListItem.SetListItemData(3, textFromInterface, null, null, null);
        newListItem.SetListItemData(4, false);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
            "season",
            solInfo.GetSeason() + 1
        });

        newListItem.SetListItemData(5, empty, null, null, null);
        newListItem.SetListItemData(6, false);
        newListItem.SetListItemData(7, false);
        newListItem.SetListItemData(8, true);
        newListItem.SetListItemData(9, false);
        newListItem.SetListItemData(10, "0/100", null, null, null);
        newListItem.SetListItemData(11, false);
        newListItem.SetListItemData(13, false);
        newListItem.SetListItemData(12, string.Empty, solInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickTrnScendenceMaterialCancel), null);
        newListItem.SetListItemData(12, visibleCloseButton);
        newListItem.Data = solInfo.GetSolID();
        return(newListItem);
    }
    private void SetSolListInfo()
    {
        string empty = string.Empty;

        this.SoldierSelectList.Clear();
        for (int i = 0; i < this.m_kSolSortList.Count; i++)
        {
            NkSoldierInfo  nkSoldierInfo     = this.m_kSolSortList[i];
            NewListItem    newListItem       = new NewListItem(this.SoldierSelectList.ColumnNum, true, string.Empty);
            EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(nkSoldierInfo.GetCharKind(), nkSoldierInfo.GetGrade());

            if (eventHeroCharCode != null)
            {
                newListItem.SetListItemData(1, "Win_I_EventSol", null, null, null);
                newListItem.EventMark = true;
            }
            else
            {
                UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(nkSoldierInfo.GetCharKind(), (int)nkSoldierInfo.GetGrade());

                if (legendFrame != null)
                {
                    newListItem.SetListItemData(1, legendFrame, null, null, null);
                }
            }
            newListItem.SetListItemData(0, false);
            newListItem.SetListItemData(2, nkSoldierInfo.GetListSolInfo(false), null, null, null);
            newListItem.SetListItemData(3, nkSoldierInfo.GetName(), null, null, null);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
                "count1",
                nkSoldierInfo.GetLevel().ToString(),
                "count2",
                nkSoldierInfo.GetSolMaxLevel().ToString()
            });

            newListItem.SetListItemData(4, empty, null, null, null);
            ITEM equipItemByUnique = nkSoldierInfo.GetEquipItemByUnique(this.m_nSearch_ItemUnique);
            if (equipItemByUnique != null && equipItemByUnique.IsValid())
            {
                newListItem.SetListItemData(5, equipItemByUnique, this.m_pkEquipItem, nkSoldierInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickItemIcon), null);
            }
            else
            {
                newListItem.SetListItemData(5, false);
            }
            newListItem.Data = nkSoldierInfo.GetSolID();
            this.SoldierSelectList.Add(newListItem);
        }
        this.SoldierSelectList.RepositionItems();
    }