예제 #1
0
    private void SetPlayerBeltBG(string imgName, int color = 0)
    {
        UISlicedSprite temp = m_myTransform.Find(m_widgetToFullName["BeltBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        temp.spriteName = imgName;
        MogoUtils.SetImageColor(temp, color);
    }
예제 #2
0
    public void AddDragonItem(int level, string type, int gridId, string imgName = "", int color = 0)
    {
        RemoveDragonItem(gridId);

        Debug.Log("Add " + gridId);
        AssetCacheMgr.GetUIInstance("DragonUIGridInfotest.prefab", (prefab, id, go) =>
        {
            GameObject obj = (GameObject)go;
            obj.SetActive(true);
            obj.name                    = gridId.ToString();
            obj.transform.parent        = GetTransform("DragonUIPackageList");// m_myTransform.FindChild(m_widgetToFullName["DragonUIPackageList"]);
            obj.transform.localPosition = m_arrDragonPackageItem[gridId].parent.localPosition;
            obj.transform.localScale    = new Vector3(1, 1, 1);

            TweenPosition tp = obj.GetComponentsInChildren <TweenPosition>(true)[0];

            tp.enabled = false;

            obj.transform.Find("DragonUIGridLevel").GetComponentsInChildren <UILabel>(true)[0].text = "Lv" + level;

            obj.transform.Find("DragonUIGridName").GetComponentsInChildren <UILabel>(true)[0].text = type;

            UISprite s   = obj.transform.Find("DragonUIGridBG").GetComponentsInChildren <UISprite>(true)[0];
            s.spriteName = imgName;
            MogoUtils.SetImageColor(s, color);

            m_listDragonItem.Add(obj);
        });
    }
예제 #3
0
    public void SetComposePearlFinalIcon(string imgName, int color = 0, int itemId = 0)
    {
        m_ssComposePearlFinal.spriteName = imgName;
        MogoUtils.SetImageColor(m_ssComposePearlFinal, color);

        m_goGOComposeDialogBodyPearlFinal.GetComponentsInChildren <InventoryGrid>(true)[0].iconID = itemId;
    }
예제 #4
0
    public void SetEquipDetailInfoImageCurrent(string p, int color = 0)
    {
        m_equipDetailImageFGCurrent.atlas      = MogoUIManager.Instance.GetAtlasByIconName(p);
        m_equipDetailImageFGCurrent.spriteName = p;

        MogoUtils.SetImageColor(m_equipDetailImageFG, color);
    }
예제 #5
0
 public void SetInsetPackageItemImage(int gridId, string imgName, int color = 0)
 {
     //Debug.LogError("gridId:" + gridId + ",imgName:" + imgName + ",color:" + color);
     m_listItemFG[gridId].spriteName = imgName;
     MogoUtils.SetImageColor(m_listItemFG[gridId], color);
     //InventoryManager.SetIcon(itemId, m_listItemFG[gridId], 0, null, m_listItemBG[gridId]);
 }
 private void SetRecommendEquipBG(string imgName, int color = 0)
 {
     if (m_spRecommendEquipImgBG != null)
     {
         m_spRecommendEquipImgBG.spriteName = imgName;
         MogoUtils.SetImageColor(m_spRecommendEquipImgBG, color);
     }
 }
예제 #7
0
    public void SetEquipmentIcon(int gridId, string imgName, int color = 0)
    {
        UISprite sp = m_listEquipmentGrid[gridId].transform.Find("StrenthenDialogIconGridImg").GetComponentsInChildren <UISprite>(true)[0];

        sp.atlas      = MogoUIManager.Instance.GetAtlasByIconName(imgName);
        sp.spriteName = imgName;
        MogoUtils.SetImageColor(m_listEquipmentGrid[gridId].transform.Find("StrenthenDialogIconGridImg").GetComponentsInChildren <UISprite>(true)[0], color);
    }
 private void SetRecommendEquiptFG(string imgName, int color = 0)
 {
     if (m_spRecommendEquipImg != null)
     {
         m_spRecommendEquipImg.atlas      = MogoUIManager.Instance.GetAtlasByIconName(imgName);
         m_spRecommendEquipImg.spriteName = imgName;
         MogoUtils.SetImageColor(m_spRecommendEquipImg, color);
     }
 }
예제 #9
0
 private void SetImage(bool dragonEnable, int dragonQuality)
 {
     m_spChooseDragonUIGrid.ShowAsWhiteBlack(false);
     m_spChooseDragonUIGrid.ShowAsWhiteBlack(!dragonEnable);
     m_goChooseDragonUIGridBGSelected.SetActive(dragonEnable);
     if (dragonEnable)
     {
         MogoUtils.SetImageColor(m_spChooseDragonUIGrid, dragonQuality);
     }
 }
예제 #10
0
    /// <summary>
    /// 设置等级礼包
    /// </summary>
    private void SetLevelPacks()
    {
        // 设置Grid图标
        MogoUIManager.Instance.TryingSetSpriteName(data.icon, m_spItemIcon);
        MogoUtils.SetImageColor(m_spItemIcon, data.color);

        m_lblNewPriceNum.text    = "x" + (data as GiftItem).resData.price;
        m_lblRebateFlagText.text = "";

        // 设置Grid按钮
        ShowButtonDraw(true);
        SetButtonDraw((data as GiftItem).resData.level); // 设置领取按钮状态
    }
예제 #11
0
    public void SetInsetHoleImage(string imgName, int holeID, int color = 0)
    {
        m_arrInsetHoleIcon[holeID].spriteName = imgName;
        MogoUtils.SetImageColor(m_arrInsetHoleIcon[holeID], color);

        if (imgName.Equals("emptyItem"))
        {
            m_arrInsetHoleTypeName[holeID].gameObject.SetActive(true);
        }
        else
        {
            m_arrInsetHoleTypeName[holeID].gameObject.SetActive(false);
        }
    }
예제 #12
0
    public void SetEquipmentIcon(int gridId, string imgName, int color = 0)
    {
        UISprite sp = m_listEquipmentGrid[gridId].transform.Find("StrenthenDialogIconGridImg").GetComponentsInChildren <UISprite>(true)[0];

        sp.spriteName = imgName;
        MogoUtils.SetImageColor(sp, color);
        //if (color == 10)
        //{
        //    m_listEquipmentGrid[gridId].transform.GetComponent<StrenthenEquipmentGrid>().enabled = false;
        //}
        //else
        //{
        //    m_listEquipmentGrid[gridId].transform.GetComponent<StrenthenEquipmentGrid>().enabled = true;
        //}
    }
예제 #13
0
    private void SetPlayerWeaponFG(string imgName, int color = 0)
    {
        UISlicedSprite temp = m_myTransform.Find(m_widgetToFullName["WeaponFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0];

        if (SETFGBYGetAtlasByIconName)
        {
            temp.atlas      = MogoUIManager.Instance.GetAtlasByIconName(imgName);
            temp.spriteName = imgName;
        }
        else
        {
            MogoUIManager.Instance.TryingSetSpriteName(imgName, temp);
        }

        MogoUtils.SetImageColor(m_myTransform.Find(m_widgetToFullName["WeaponFG"]).GetComponentsInChildren <UISlicedSprite>(true)[0], color);
    }
예제 #14
0
    public void AddPackageGridItem(int level, string type, int gridId, string imgName = "", int color = 0)
    {
        RemoveRuneItem(gridId);

        LoggerHelper.Debug("Add " + gridId);
        AssetCacheMgr.GetUIInstance("RuneUIInsetGridInfotest.prefab", (prefab, id, go) =>
        {
            GameObject obj = (GameObject)go;
            obj.SetActive(true);
            obj.name                    = gridId.ToString();
            obj.transform.parent        = m_myTransform.FindChild(m_widgetToFullName["RuneUIPacakgeGridBGList"]);
            obj.transform.localPosition = m_arrPackageGrid[gridId].localPosition;
            obj.transform.localScale    = new Vector3(1, 1, 1);

            obj.transform.FindChild("RuneUIInsetGridLevel").GetComponentsInChildren <UILabel>(true)[0].text = "Lv" + level;
            obj.transform.FindChild("RuneUIInsetGridName").GetComponentsInChildren <UILabel>(true)[0].text  = type;
            UISprite s   = obj.transform.FindChild("RuneUIInsetGridBG").GetComponentsInChildren <UISprite>(true)[0];
            s.spriteName = imgName;
            MogoUtils.SetImageColor(s, color);

            m_listRuneItem.Add(obj);
        });
    }
예제 #15
0
    /// <summary>
    /// 设置商城购买物品
    /// </summary>
    private void SetMarketItem()
    {
        ShowButtonBuy(true);
        if (data.marketItemType == MarkItemType.WingItem)
        {
            ShowPreviewBtn(true);
        }

        if (data.resData.priceOrg > 0)
        {
            m_lblOldPriceNum.text    = data.resData.priceOrg + "";
            m_lblNewPriceNum.text    = "x" + data.resData.priceNow;
            m_lblRebateTitle.enabled = true;
            m_spOldPriceIcon.enabled = true;
            m_spNewPriceIcon.enabled = true;
            m_lblOldPriceNum.enabled = true;
        }
        else
        {
            m_lblNewPriceNum.text    = "x" + data.resData.priceNow;
            m_lblRebateTitle.enabled = false;
            m_spOldPriceIcon.enabled = false;
            m_lblOldPriceNum.enabled = false;
        }
        m_lblItemNum.text     = "x" + data.resData.itemNumber + "";
        m_lblRebateTitle.text = "";

        MogoUIManager.Instance.TryingSetSpriteName(data.icon, m_spItemIcon);
        MogoUtils.SetImageColor(m_spItemIcon, data.color);

        FlagDisable();
        m_lblRebateFlagText.text = "";
        switch (data.resData.label)
        {
        case 1:
        {        //新品
            //newflag.SetActive(true);
            m_goRebateFlagBG.SetActive(true);
            m_lblRebateFlagText.text = Mogo.GameData.LanguageData.GetContent(200026);         // "新品";
            break;
        }

        case 2:
        {        //热销
            //hotflag.SetActive(true);
            m_goRebateFlagBG.SetActive(true);
            m_lblRebateFlagText.text = Mogo.GameData.LanguageData.GetContent(200011);         // "热销";
            break;
        }

        case 3:
        {        //限购
            //limitflag.SetActive(true);
            m_goRebateFlagBG.SetActive(true);
            m_lblRebateFlagText.text = Mogo.GameData.LanguageData.GetContent(200015);         // "限购";
            break;
        }

        case 4:
        {                                                                             //折扣
            m_goRebateFlagBG.SetActive(true);
            m_lblRebateFlagText.text = Mogo.GameData.LanguageData.GetContent(200016); // "折扣";
            break;
        }
        }
        delline.SetActive(false);
        float r = (float)data.resData.priceNow / (float)data.resData.priceOrg;

        if (r >= 1)
        {
            return;
        }
        r = r * 10;
        m_lblRebateTitle.text = r.ToString("f1") + Mogo.GameData.LanguageData.GetContent(200017);
        delline.SetActive(true);
    }
예제 #16
0
 private void SetPlayerWeaponBG(string imgName, int color = 0)
 {
     m_myTransform.Find(m_widgetToFullName["WeaponBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0].spriteName = imgName;
     MogoUtils.SetImageColor(m_myTransform.Find(m_widgetToFullName["WeaponBG"]).GetComponentsInChildren <UISlicedSprite>(true)[0], color);
 }
예제 #17
0
 public void SetDiamondTipIcon(string iconName, int color = 0)
 {
     m_ssDiamondTipIcon.spriteName = iconName;
     MogoUtils.SetImageColor(m_ssDiamondTipIcon, color);
 }