zhaoyang 2 vuotta sitten
vanhempi
commit
cb6faf7f41

+ 11 - 9
FGUIProject/assets/Studio/components/ListLevelItem.xml

@@ -1,27 +1,29 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="960,254">
-  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
-    <loader id="n29_v482" name="loaBg" xy="47,0" pivot="0.5,0" size="913,254" group="n42_v482" scale="-1,1" url="ui://xz8kxrecv4822a" autoSize="true">
+    <loader id="n29_v482" name="loaBg" xy="0,0" pivot="0.5,0" size="913,254" url="ui://xz8kxrecv4822a" autoSize="true">
       <gearXY controller="c1" pages="1" values="47,0" default="0,0"/>
       <gearSize controller="c1" pages="1" values="913,254,-1,1" default="913,254,1,1"/>
     </loader>
-    <loader id="n30_v482" name="loaIcon" xy="744,32" size="166,190" group="n42_v482" url="ui://xz8kxrecv4822h" autoSize="true">
+    <loader id="n30_v482" name="loaIcon" xy="38,32" size="166,190" url="ui://xz8kxrecv4822h" autoSize="true">
       <gearXY controller="c1" pages="0,1" values="38,32|744,32"/>
     </loader>
-    <text id="n31_v482" name="txtName" xy="408,78" pivot="0.5,0" size="190,64" group="n42_v482" font="ui://eg2y0ldprkrwti1" fontSize="48" color="#b38e5f" bold="true" text="邢慈静-1">
+    <loader id="n43_v482" name="loaItem" xy="58,57" size="137,140" url="ui://eg2y0ldpm9wm8v" fill="scale">
+      <gearXY controller="c1" pages="0" values="58,57" default="763,57"/>
+    </loader>
+    <text id="n31_v482" name="txtName" xy="355,78" pivot="0.5,0" size="190,64" font="ui://eg2y0ldprkrwti1" fontSize="48" color="#b38e5f" bold="true" text="邢慈静-1">
       <gearXY controller="c1" pages="1" values="408,78" default="355,78"/>
     </text>
-    <component id="n32_v482" name="comFlower" src="rqo41r" fileName="components/CompFlower.xml" xy="212,160" size="156,45" group="n42_v482">
+    <component id="n32_v482" name="comFlower" src="rqo41r" fileName="components/CompFlower.xml" xy="581,160" size="156,45">
       <gearXY controller="c1" pages="1" values="212,160" default="581,160"/>
     </component>
-    <image id="n33_v482" name="imgLock" src="rbxq4" fileName="images/zhuxian_shuoto.png" xy="468,108" size="71,37" group="n35_v482"/>
-    <image id="n34_v482" name="n34" src="v4822b" fileName="images/cyjd_di_3.png" xy="47,0" pivot="0.5,0" group="n35_v482" scale="-1,1">
+    <image id="n33_v482" name="imgLock" src="rbxq4" fileName="images/zhuxian_shuoto.png" xy="421,108" size="71,37" group="n35_v482"/>
+    <image id="n34_v482" name="n34" src="v4822b" fileName="images/cyjd_di_3.png" xy="0,0" pivot="0.5,0" group="n35_v482">
       <gearSize controller="c1" pages="1" values="913,254,-1,1" default="913,254,1,1"/>
     </image>
-    <group id="n35_v482" name="grpLock" xy="47,0" size="913,254" group="n42_v482" advanced="true">
+    <group id="n35_v482" name="grpLock" xy="0,0" size="913,254" advanced="true">
       <gearXY controller="c1" pages="1" values="47,0" default="0,0"/>
     </group>
-    <group id="n42_v482" name="n42" xy="47,0" size="913,254"/>
   </displayList>
 </component>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListLevelItem.cs

@@ -10,6 +10,7 @@ namespace UI.Studio
         public Controller m_c1;
         public GLoader m_loaBg;
         public GLoader m_loaIcon;
+        public GLoader m_loaItem;
         public GTextField m_txtName;
         public UI_CompFlower m_comFlower;
         public GImage m_imgLock;
@@ -64,6 +65,7 @@ namespace UI.Studio
             m_c1 = comp.GetController("c1");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+            m_loaItem = (GLoader)comp.GetChild("loaItem");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_comFlower = (UI_CompFlower)UI_CompFlower.Create(comp.GetChild("comFlower"));
             m_imgLock = (GImage)comp.GetChild("imgLock");
@@ -74,6 +76,7 @@ namespace UI.Studio
             m_c1 = null;
             m_loaBg = null;
             m_loaIcon = null;
+            m_loaItem = null;
             m_txtName = null;
             m_comFlower.Dispose();
             m_comFlower = null;

+ 20 - 2
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs

@@ -112,9 +112,27 @@ namespace GFGGame
             UI_ListLevelItem item = UI_ListLevelItem.Proxy(obj);
             item.m_c1.selectedIndex = index % 2 == 0 ? 0 : 1;
             item.m_txtName.text = _storyLevelCfgs[index].name;
-            string resBg = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID) ? "cyjd_di_1" : "cyjd_di_2";
+            bool isFight = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID);
+            string resBg = isFight ? "cyjd_di_1" : "cyjd_di_2";
             item.m_loaBg.url = string.Format("ui://Studio/{0}", resBg);
-            item.m_loaIcon.url = string.Format("ui://Studio/{0}_{1}", _filingCfg.res, index);
+
+            if (isFight)
+            {
+                item.m_loaBg.url = "ui://Studio/cyjd_di_1";
+                item.m_loaIcon.visible = false;
+                item.m_loaItem.visible = true;
+                StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(storyFightCfg.bonusBaseArr[0][0]);
+                item.m_loaItem.url = ResPathUtil.GetIconPath(itemCfg);
+            }
+            else
+            {
+                item.m_loaBg.url = "ui://Studio/cyjd_di_2";
+                item.m_loaItem.visible = false;
+                item.m_loaIcon.visible = true;
+                item.m_loaIcon.url = string.Format("ui://Studio/{0}_{1}", _filingCfg.res, index);
+
+            }
             item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
             item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
             item.target.data = index;// _storyLevelCfgs[_index];

BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes