zhaoyang 2 gadi atpakaļ
vecāks
revīzija
00c25dc3bb

+ 7 - 3
FGUIProject/assets/poem/componentsGallery/ListItem.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="500,900" overflow="hidden">
+  <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
-    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,820" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleMatchWidth"/>
-    <image id="n21_r9ri" name="n21" src="r9ri12h" fileName="imagesGallery/hl_cjkuangdi.png" xy="0,0" size="500,903">
+    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,820" group="n23_pac9" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleMatchWidth"/>
+    <image id="n21_r9ri" name="n21" src="r9ri12h" fileName="imagesGallery/hl_cjkuangdi.png" xy="0,0" size="500,903" group="n23_pac9">
       <relation target="n15_r9ri" sidePair="height-height"/>
     </image>
     <text id="n16_r9ri" name="txtName" xy="20,838" size="184,42" group="n22_r9ri" font="ui://eg2y0ldpweoktkb" fontSize="30" color="#ac9370" leading="0" letterSpacing="-4" text="名字名字名字啊"/>
@@ -12,9 +13,12 @@
     <component id="n20_r9ri" name="btnVote" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="386,842" size="32,33" group="n22_r9ri">
       <Button title="50000" icon="ui://iyz778gkr9ri124" selectedIcon="ui://iyz778gkr9ri123"/>
     </component>
-    <group id="n22_r9ri" name="n22" xy="20,838" size="398,42" advanced="true">
+    <group id="n22_r9ri" name="n22" xy="20,838" size="398,42" group="n23_pac9" advanced="true">
       <relation target="n15_r9ri" sidePair="top-bottom"/>
     </group>
+    <group id="n23_pac9" name="n23" xy="0,0" size="500,903" advanced="true">
+      <gearDisplay controller="c1" pages="1"/>
+    </group>
   </displayList>
   <relation target="n15_r9ri" sidePair="height-height"/>
 </component>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_ListItem.cs

@@ -7,6 +7,7 @@ namespace UI.Poem
     public partial class UI_ListItem
     {
         public GComponent target;
+        public Controller m_c1;
         public GLoader m_loaIcon;
         public GTextField m_txtName;
         public GButton m_btnCollect;
@@ -58,6 +59,7 @@ namespace UI.Poem
 
         private void Init(GComponent comp)
         {
+            m_c1 = comp.GetController("c1");
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnCollect = (GButton)comp.GetChild("btnCollect");
@@ -65,6 +67,7 @@ namespace UI.Poem
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_c1 = null;
             m_loaIcon = null;
             m_txtName = null;
             m_btnCollect = null;

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryView.cs

@@ -122,6 +122,7 @@ namespace GFGGame
 
             EventAgent.AddEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
             EventAgent.AddEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryList);
+            EventAgent.AddEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryRankList);
         }
 
         protected override async void OnShown()
@@ -202,6 +203,7 @@ namespace GFGGame
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
             EventAgent.RemoveEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryList);
+            EventAgent.RemoveEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryRankList);
         }
 
         private void OnBtnBackClick()
@@ -440,6 +442,7 @@ namespace GFGGame
         }
         private void UpdateGalleryRankList()
         {
+            if (_tabIndex != TabType.RECOVER || _subtabIndex != RecommendType.RANK) return;
             _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
             UpdateView();
         }
@@ -478,7 +481,9 @@ namespace GFGGame
         {
             PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListItem item = UI_ListItem.Proxy(obj);
+            item.m_c1.selectedIndex = 0;
             if (data.Ntexture == null) return;
+            item.m_c1.selectedIndex = 1;
             item.m_loaIcon.texture = data.Ntexture;
             item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
             item.m_txtName.text = data.AuthorName;

BIN
GameClient/Assets/ResIn/UI/Poem/Poem_fui.bytes