Kaynağa Gözat

改卡牌图标加载

zhaoyang 2 yıl önce
ebeveyn
işleme
98a063f98b

+ 1 - 1
FGUIProject/assets/CommonGame/ItemExchangeUI.xml

@@ -10,7 +10,7 @@
     <text id="n11_si5z" name="txtDesc" xy="439,214" size="506,166" group="n12_si5z" fontSize="32" color="#b08d5c" leading="1" ubb="true" autoSize="shrink" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
     <image id="n39_x8jz" name="n39" src="x8jztnq" fileName="images/wplb_db.png" xy="64,124" size="346,336" group="n55_ofwu" aspect="true"/>
     <loader id="n8_si5z" name="loaRarity" xy="117,193" size="44,94" group="n55_ofwu" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
-    <loader id="n9_si5z" name="loaIcon" xy="238,291" pivot="0.5,0.5" anchor="true" size="180,180" group="n55_ofwu" aspect="true" autoSize="true"/>
+    <loader id="n9_si5z" name="loaIcon" xy="238,291" pivot="0.5,0.5" anchor="true" size="180,180" group="n55_ofwu" aspect="true" align="center" vAlign="middle" fill="scaleMatchHeight" autoSize="true"/>
     <text id="n28_s5s9" name="txtExchangeCount" xy="315,349" pivot="1,0" size="56,49" group="n55_ofwu" fontSize="36" color="#8e7c6b" vars="true" text="x{count=20}"/>
     <group id="n55_ofwu" name="n55" xy="64,124" size="346,336" group="n12_si5z"/>
     <group id="n12_si5z" name="n12" xy="64,124" size="914,336" group="n33_l500" advanced="true"/>

+ 2 - 2
FGUIProject/assets/CommonGame/components/ComIcon000.xml

@@ -2,8 +2,8 @@
 <component size="222,254">
   <displayList>
     <image id="n25_pu55" name="n25" src="orsttit" fileName="images/wpbb_di.png" xy="0,0" size="222,222"/>
-    <loader id="n12_ehs9" name="loaIcon" xy="110,111" pivot="0.5,0.5" anchor="true" size="140,140" aspect="true" url="ui://xz8kxrecng0i27" fill="scaleFree"/>
-    <text id="n17_j48o" name="txtHasCount" xy="112,243" pivot="0.5,0" anchor="true" size="105,36" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
+    <loader id="n12_ehs9" name="loaIcon" xy="110,111" pivot="0.5,0.5" anchor="true" size="140,140" aspect="true" url="ui://xz8kxrecng0i27" align="center" vAlign="middle" fill="scaleMatchWidth"/>
+    <text id="n17_j48o" name="txtHasCount" xy="112,243" pivot="0.5,0" anchor="true" size="100,36" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="164,0" size="44,94" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
     <image id="n23_slyz" name="imgHas" src="slyzthy" fileName="images/yx_yihd.png" xy="21,91" size="178,40" group="n29_pu55"/>
     <image id="n22_cs8j" name="imgNotHas" src="cs8jthx" fileName="images/yx_whd.png" xy="21,91" size="178,40" group="n29_pu55"/>

+ 2 - 2
FGUIProject/assets/CommonGame/components/ComIcon001.xml

@@ -2,8 +2,8 @@
 <component size="124,124">
   <displayList>
     <loader id="n25_pu55" name="bg" xy="1,1" size="123,123" group="n30_9jv6" url="ui://eg2y0ldpl500tlv"/>
-    <loader id="n12_ehs9" name="loaIcon" xy="63,63" pivot="0.5,0.5" anchor="true" size="102,102" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" fill="scale"/>
-    <text id="n17_j48o" name="txtHasCount" xy="64,194" pivot="0.5,0" anchor="true" size="101,36" group="n30_9jv6" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
+    <loader id="n12_ehs9" name="loaIcon" xy="63,63" pivot="0.5,0.5" anchor="true" size="102,102" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" align="center" vAlign="middle" fill="scaleMatchHeight"/>
+    <text id="n17_j48o" name="txtHasCount" xy="64,194" pivot="0.5,0" anchor="true" size="100,36" group="n30_9jv6" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="89,7" size="27,58" group="n30_9jv6" aspect="true" url="ui://eg2y0ldpo9ghtll" fill="scale"/>
     <loader id="n31_l500" name="numBg" xy="7,86" size="112,32" group="n30_9jv6" url="ui://eg2y0ldpl500tlw"/>
     <image id="n23_slyz" name="imgHas" src="slyzthy" fileName="images/yx_yihd.png" xy="-27,42" size="178,40" group="n29_pu55"/>

+ 1 - 1
FGUIProject/assets/CommonGame/components/ComIcon002.xml

@@ -2,7 +2,7 @@
 <component size="180,180">
   <displayList>
     <image id="n25_pu55" name="n25" src="hhx9j" fileName="imagesNew/wp_baseboard1.png" xy="1,1"/>
-    <loader id="n12_ehs9" name="loaIcon" xy="89,94" pivot="0.5,0.5" anchor="true" size="122,122" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" fill="scale"/>
+    <loader id="n12_ehs9" name="loaIcon" xy="89,94" pivot="0.5,0.5" anchor="true" size="122,122" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" align="center" vAlign="middle" fill="scaleMatchHeight"/>
     <text id="n17_j48o" name="txtHasCount" xy="90,225" pivot="0.5,0" anchor="true" size="100,36" group="n30_9jv6" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="115,38" size="27,58" group="n30_9jv6" aspect="true" url="ui://eg2y0ldpo9ghtll" fill="scale"/>
     <image id="n23_slyz" name="imgHas" src="slyzthy" fileName="images/yx_yihd.png" xy="-1,73" size="178,40" group="n29_pu55"/>

+ 1 - 1
FGUIProject/assets/CommonGame/components/ComIcon003.xml

@@ -2,7 +2,7 @@
 <component size="210,210">
   <displayList>
     <image id="n25_pu55" name="n25" src="volstnl" fileName="imagesNew/wp_bg_yuan.png" xy="1,1"/>
-    <loader id="n12_ehs9" name="loaIcon" xy="105,105" pivot="0.5,0.5" anchor="true" size="152,152" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" fill="scale"/>
+    <loader id="n12_ehs9" name="loaIcon" xy="105,105" pivot="0.5,0.5" anchor="true" size="152,152" group="n30_9jv6" aspect="true" url="ui://xz8kxrecng0i27" align="center" vAlign="middle" fill="scaleMatchHeight"/>
     <text id="n17_j48o" name="txtHasCount" xy="105,225" pivot="0.5,0" anchor="true" size="100,36" group="n30_9jv6" visible="false" fontSize="26" color="#a28d77" vars="true" text="已拥有:{count=0}"/>
     <loader id="n18_j48o" name="loaRarity" xy="162,0" size="44,94" group="n30_9jv6" aspect="true" url="ui://eg2y0ldpo9ghtll" fill="scale" autoSize="true"/>
     <image id="n23_slyz" name="imgHas" src="volstnm" fileName="imagesNew/wp_own.png" xy="16,95" group="n29_pu55" visible="false"/>

+ 2 - 2
FGUIProject/assets/CommonGame/components/ComRewardItem.xml

@@ -2,8 +2,8 @@
 <component size="204,232">
   <displayList>
     <image id="n2_m9wm" name="n2" src="m9wm8s" fileName="images/gxhd_gd_dik.png" xy="0,0"/>
-    <loader id="n3_m9wm" name="loaIcon" xy="40,40" pivot="0.5,0.5" size="116,116" aspect="true" url="ui://eg2y0ldpm9wm8v" fill="scaleFree"/>
-    <text id="n5_m9wm" name="txtCount" xy="162,160" pivot="1,1" size="34,36" fontSize="26" color="#efd78d" text="x1"/>
+    <loader id="n3_m9wm" name="loaIcon" xy="40,40" pivot="0.5,0.5" size="116,116" aspect="true" url="ui://eg2y0ldpm9wm8v" align="center" vAlign="middle" fill="scaleMatchWidth"/>
+    <text id="n5_m9wm" name="txtCount" xy="167,160" pivot="1,1" size="29,36" fontSize="26" color="#efd78d" text="x1"/>
     <text id="n4_m9wm" name="txtName" xy="98,196" pivot="0.5,0" anchor="true" size="106,36" fontSize="26" color="#fdedbe" text="赵钱孙李"/>
     <image id="n6_kzte" name="imgOnceBonus" src="kzteths" fileName="images/gxhd_scjlscjl.png" xy="8,134"/>
   </displayList>

+ 1 - 1
FGUIProject/assets/CommonGame/components/ComTipsBase.xml

@@ -2,7 +2,7 @@
 <component size="962,662">
   <displayList>
     <image id="n27_ofwu" name="n27" src="x8jztnq" fileName="images/wplb_db.png" xy="0,0" group="n29_ofwu"/>
-    <loader id="n8_si5z" name="loaIcon" xy="183,175" pivot="0.5,0.5" anchor="true" size="200,200" group="n29_ofwu" aspect="true" autoSize="true"/>
+    <loader id="n8_si5z" name="loaIcon" xy="183,175" pivot="0.5,0.5" anchor="true" size="200,200" group="n29_ofwu" aspect="true" align="center" vAlign="middle" fill="scaleMatchHeight"/>
     <loader id="n6_ohbx" name="loaRarity" xy="246,65" size="44,94" group="n29_ofwu" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
     <group id="n29_ofwu" name="n29" xy="0,0" size="362,351" group="n24_u2u3"/>
     <image id="n20_r9ri" name="n20" src="x8jztnr" fileName="images/lm_db_3.png" xy="350,49" size="575,274" group="n28_ofwu"/>

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/ArenaViewManager.cs

@@ -65,9 +65,9 @@ namespace GFGGame
             item.m_txtMyScore.text = myScore.ToString();
             item.m_txtTargetScore.text = targetScore.ToString();
             ItemCfg cardCfg = ItemCfgArray.Instance.GetCfg(myCardId);
-            item.m_loaMyCard.m_comCardmask.m_loaCard.url = cardCfg == null ? "" : ResPathUtil.GetCardSmallPath(cardCfg.res);
+            item.m_loaMyCard.m_comCardmask.m_loaCard.url = cardCfg == null ? "" : ResPathUtil.GetCardIconPath(cardCfg.res);
             ItemCfg targetCardCfg = ItemCfgArray.Instance.GetCfg(targetCardId);
-            item.m_loaTargetCard.m_comCardmask.m_loaCard.url = targetCardCfg == null ? "" : ResPathUtil.GetCardSmallPath(targetCardCfg.res);
+            item.m_loaTargetCard.m_comCardmask.m_loaCard.url = targetCardCfg == null ? "" : ResPathUtil.GetCardIconPath(targetCardCfg.res);
             RoleInfoManager.Instance.UpdateHead(item.m_comMyHead, RoleDataManager.headId, RoleDataManager.headBorderId);
             if (targetHeadId > 0)
             {

+ 0 - 6
GameClient/Assets/Game/HotUpdate/Data/CardDataManager.cs

@@ -180,17 +180,11 @@ namespace GFGGame
                 if (showLv + 1 > maxLv)
                 {
                     //满级
-                    // showLv = showLv - 1;
                     showExp = tCurCfg.needExp;
                     break;
                 }
                 showLv++;
                 tCurCfg = CardLvlCfgArray.Instance.GetCfgByrarityAndcardLvl(rarity, showLv);
-                // if (showExp < tCurCfg.needExp)
-                // {
-                //     showLv = showLv - 1;
-                //     break;
-                // }
             }
         }
 

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Utils/ResPathUtil.cs

@@ -38,6 +38,10 @@ namespace GFGGame
         //===================================↑↑↑UI路径↑↑↑================================
         public static string GetIconPath(string res, string extName)
         {
+            if (res.IndexOf("kp_") == 0)
+            {
+                return GetCardIconPath(res);
+            }
             return $"{TEXTURE_DIR_PATH}/Icon/{res}.{extName}";
         }
         public static string GetIconPath(ItemCfg itemCfg)
@@ -81,7 +85,7 @@ namespace GFGGame
         {
             return $"{TEXTURE_DIR_PATH}/Card/Bg/{res}.{extName}";
         }
-        public static string GetCardSmallPath(string res, string extName = "jpg")
+        public static string GetCardIconPath(string res, string extName = "jpg")
         {
             return $"{TEXTURE_DIR_PATH}/Card/Card/{res}.{extName}";
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -187,7 +187,7 @@ namespace GFGGame
             _ui.m_comCard.m_c1.selectedIndex = 1;
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cardId);
             _ui.m_comCard.m_txtCardName.text = itemCfg.name;
-            _ui.m_comCard.m_comCard.m_loaCard.url = ResPathUtil.GetCardSmallPath(itemCfg.res);
+            _ui.m_comCard.m_comCard.m_loaCard.url = ResPathUtil.GetCardIconPath(itemCfg.res);
             _ui.m_comCard.m_loaScore.url = ResPathUtil.GetScorePath(ArenaDataManager.Instance.ThemeList[_themeIndex]);
             RarityIconController.UpdateRarityIcon(_ui.m_comCard.m_loaRarity, cardId, false);
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Card/CardDetailView.cs

@@ -99,7 +99,7 @@ namespace GFGGame
             UI_ListCardItem listItem = UI_ListCardItem.Proxy(obj);
             CardData data = (_ui.m_listCard.data as List<CardData>)[index];//CardDataManager.GetCardList(_ui.m_listRole.selectedIndex)[index];
             listItem.target.data = data;
-            listItem.m_comCard.m_loaCard.url = ResPathUtil.GetCardSmallPath(data.resources[data.resIndex]);
+            listItem.m_comCard.m_loaCard.url = ResPathUtil.GetCardIconPath(data.resources[data.resIndex]);
             RarityIconController.UpdateRarityIcon(listItem.m_loaRarity, data.itemCfg.id, false);// ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + data.itemCfg.rarity);
             listItem.m_loaMainScore.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (data.itemCfg.mainScore));
 

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -143,6 +143,7 @@ namespace GFGGame
             this.UpdateRedDot();
             _comFosterBottom.m_ctrlTab.selectedIndex = this._selectTab;
             _comFosterBottom.m_listSkill.selectedIndex = 0;
+            _comFosterBottom.m_btnClearAll.visible = false;
 
             List<CardStarCfg> cardStarCfgs = CardStarCfgArray.Instance.GetCfgsBycardId(_cardData.id);
             for (int i = 0; i < cardStarCfgs.Count; i++)
@@ -467,7 +468,7 @@ namespace GFGGame
             _comLvConsumeGold = UI_ComCost.Proxy(_comFosterBottom.m_ComLvConsumeGold);
             _comLvConsumeGold.m_txtNeed.text = count.ToString();
             UI_ComCost.ProxyEnd();
-
+            _comFosterBottom.m_btnClearAll.visible = hasExp > 0;
             int previewLv = 0;
             int previewExp = 0;
             CardDataManager.GetPreViewLvAndExp(_cardData.id, _cardData.lv, _cardData.exp, hasExp, out previewLv, out previewExp);
@@ -676,7 +677,7 @@ namespace GFGGame
             {
                 _comFosterBottom.m_listShowCard.selectedIndex = index;
             }
-            loaStarCard.url = ResPathUtil.GetCardSmallPath(_cardData.resources[index]);
+            loaStarCard.url = ResPathUtil.GetCardIconPath(_cardData.resources[index]);
             listItem.data = index;
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs

@@ -132,7 +132,7 @@ namespace GFGGame
             UI_ListCardItem item = UI_ListCardItem.Proxy(obj);// obj as GButton;
 
             item.m_txtName.text = cardData.itemCfg.name;
-            item.m_comCardMask.m_loaCard.asLoader.url = ResPathUtil.GetCardSmallPath(cardData.resources[cardData.resIndex]);
+            item.m_comCardMask.m_loaCard.asLoader.url = ResPathUtil.GetCardIconPath(cardData.resources[cardData.resIndex]);
             item.m_txtLv.text = string.Format("{0}级", cardData.lv);
             // item.m_loaRarity.url = ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + cardData.itemCfg.rarity);
             RarityIconController.UpdateRarityIcon(item.m_loaRarity, cardData.itemCfg.id, false);// ResPathUtil.GetCommonGameResPath("kp_sxing_x_" + data.itemCfg.rarity);

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes