zhaoyang преди 2 години
родител
ревизия
c718f1f47d

+ 3 - 3
FGUIProject/assets/poem/componentsGallery/ListRankItem.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="996,1269" overflow="hidden">
-  <controller name="c1" pages="0,,1,,2,,3," selected="0"/>
+  <controller name="c1" pages="0,,1,,2,,3," selected="3"/>
   <displayList>
     <loader id="n3_r9ri" name="loaIcon" xy="1,0" pivot="0.5,0.5" size="994,1420" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleMatchWidth">
       <relation target="" sidePair="height-height"/>
@@ -29,14 +29,14 @@
       <gearDisplay controller="c1" pages="2"/>
       <relation target="" sidePair="height-height"/>
     </image>
-    <image id="n15_r9ri" name="n15" src="r9ri13f" fileName="imagesGallery/hl_phb_4.png" xy="0,-2" size="996,1274">
+    <image id="n15_r9ri" name="n15" src="r9ri13f" fileName="imagesGallery/hl_phb_4.png" xy="0,0" size="996,1274">
       <gearDisplay controller="c1" pages="3"/>
       <relation target="" sidePair="height-height"/>
     </image>
     <text id="n7_r9ri" name="txtRank" xy="78,47" pivot="0.5,0" size="36,71" font="ui://eg2y0ldpwonotj9" fontSize="54" color="#fdf4e6" strokeColor="#d4b06b" strokeSize="2" text="2">
       <gearDisplay controller="c1" pages="3"/>
     </text>
-    <text id="n4_r9ri" name="txtName" xy="37,1193" size="182,41" group="n14_r9ri" fontSize="30" color="#ac806f" text="名字名字名字啊"/>
+    <text id="n4_r9ri" name="txtName" xy="37,1193" size="208,41" group="n14_r9ri" fontSize="30" color="#ac806f" text="名字名字名字啊"/>
     <component id="n5_r9ri" name="btnCollect" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="740,1201" size="32,30" group="n14_r9ri">
       <Button title="5000" icon="ui://iyz778gkr9ri128" selectedIcon="ui://iyz778gkr9ri127"/>
     </component>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -92,5 +92,6 @@ namespace GFGGame
         public const string GALLERY_RANK_DATA_CHANGE = "GALLERY_RANK_DATA_CHANGE";//画廊排行榜数据变化
 
         public const string DOWNLOAD_FINISH = "DOWNLOAD_FINISH";//下载完成
+        public const string DOWNLOAD_FINISH_ONE = "DOWNLOAD_FINISH_One";//下载完成一个
     }
 }

+ 2 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/PictureStorageHelper.cs

@@ -78,12 +78,13 @@ namespace GFGGame
                     {
                         Texture2D texture = (request.downloadHandler as DownloadHandlerTexture).texture;
                         data.Ntexture = new NTexture(texture);
+                        EventAgent.DispatchEvent(ConstMessage.DOWNLOAD_FINISH_ONE);
+
                     }
                 }
             }
             if (callBack != null) callBack();
             ET.Log.Debug("Download  finish!!!");
-            EventAgent.DispatchEvent(ConstMessage.DOWNLOAD_FINISH);
         }
 
         public static IEnumerator Download(List<PoemPhotoData> list)

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

@@ -121,7 +121,7 @@ namespace GFGGame
             base.AddEventListener();
 
             EventAgent.AddEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
-            // EventAgent.AddEventListener(ConstMessage.GALLERY_RANK_DATA_CHANGE, UpdateGalleryRankList);
+            EventAgent.AddEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryList);
         }
 
         protected override async void OnShown()
@@ -201,7 +201,7 @@ namespace GFGGame
         {
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.GALLERY_DATA_CHANGE, UpdateGalleryList);
-            // EventAgent.RemoveEventListener(ConstMessage.GALLERY_RANK_DATA_CHANGE, UpdateGalleryRankList);
+            EventAgent.RemoveEventListener(ConstMessage.DOWNLOAD_FINISH_ONE, UpdateGalleryList);
         }
 
         private void OnBtnBackClick()
@@ -478,7 +478,7 @@ namespace GFGGame
         {
             PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListItem item = UI_ListItem.Proxy(obj);
-
+            if (data.Ntexture == null) return;
             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;
@@ -510,7 +510,7 @@ namespace GFGGame
             long workId = _galleryDatas[index];
             PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListRankItem item = UI_ListRankItem.Proxy(obj);
-
+            if (data.Ntexture == null) return;
             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