فهرست منبع

相册预览适配优化

zhaoyang 2 سال پیش
والد
کامیت
74d69500b8

+ 10 - 9
FGUIProject/assets/poem/PoemPhotoPreviewUI.xml

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
     <graph id="n14_uyux" name="grhBg" xy="0,0" size="1080,1920" alpha="0.5" type="rect" lineSize="0" fillColor="#ff000000">
       <relation target="" sidePair="width-width,height-height"/>
     </graph>
-    <list id="n4_v482" name="list" xy="40,150" size="1000,1620" layout="pagination" overflow="scroll" scroll="horizontal" scrollBarFlags="138" defaultItem="ui://iyz778gkv482b">
+    <list id="n4_v482" name="list" xy="40,130" size="1000,1620" layout="pagination" overflow="scroll" scroll="horizontal" scrollBarFlags="138" defaultItem="ui://iyz778gkv482b">
       <gearDisplay controller="c1" pages="0"/>
+      <relation target="" sidePair="middle-middle"/>
       <item/>
       <item/>
       <item/>
@@ -20,19 +21,19 @@
       <item/>
       <item/>
     </list>
-    <component id="n12_11rzz" name="btnLeft" src="uyux10d" fileName="components/Button8.xml" xy="98,960" pivot="0.5,0.5" anchor="true" rotation="180">
+    <component id="n12_11rzz" name="btnLeft" src="uyux10d" fileName="componentsPhoto/Button8.xml" xy="98,960" pivot="0.5,0.5" anchor="true" rotation="180">
       <relation target="" sidePair="middle-middle"/>
       <Button icon="ui://eg2y0ldpuyuxtj3"/>
     </component>
-    <component id="n13_11rzz" name="btnRight" src="uyux10d" fileName="components/Button8.xml" xy="980,960" pivot="0.5,0.5" anchor="true">
+    <component id="n13_11rzz" name="btnRight" src="uyux10d" fileName="componentsPhoto/Button8.xml" xy="980,960" pivot="0.5,0.5" anchor="true">
       <relation target="" sidePair="middle-middle"/>
       <Button icon="ui://eg2y0ldpuyuxtj3"/>
     </component>
-    <image id="n15_uyux" name="n15" src="uyuxzn" fileName="photImages/xc_bkuangdi.png" xy="0,1775" group="n16_mdd9"/>
-    <component id="n6_v482" name="btnLock" src="v4826" fileName="components/Button1.xml" xy="57,1813" group="n16_mdd9"/>
-    <component id="n7_v482" name="btnUp" src="v4827" fileName="components/Button2.xml" xy="865,1813" group="n16_mdd9"/>
-    <component id="n9_v482" name="btnShare" src="v482c" fileName="components/Button4.xml" xy="964,1813" group="n16_mdd9"/>
-    <text id="n8_v482" name="txtTime" xy="345,1821" pivot="0.5,0" size="387,56" group="n16_mdd9" fontSize="42" color="#aa8c61" align="center" text="2022-1-8 17:14:30"/>
+    <image id="n15_uyux" name="n15" src="uyuxzn" fileName="imagesPhoto/xc_bkuangdi.png" xy="0,1775" group="n16_mdd9"/>
+    <component id="n6_v482" name="btnLock" src="v4826" fileName="componentsPhoto/Button1.xml" xy="57,1813" group="n16_mdd9"/>
+    <component id="n7_v482" name="btnUp" src="v4827" fileName="componentsPhoto/Button2.xml" xy="865,1813" group="n16_mdd9"/>
+    <component id="n9_v482" name="btnShare" src="v482c" fileName="componentsPhoto/Button4.xml" xy="964,1813" group="n16_mdd9"/>
+    <text id="n8_v482" name="txtTime" xy="353,1821" pivot="0.5,0" size="370,56" group="n16_mdd9" fontSize="42" color="#aa8c61" align="center" text="2022-1-8 17:14:30"/>
     <group id="n16_mdd9" name="n16" xy="0,1775" size="1080,145" advanced="true">
       <relation target="" sidePair="bottom-bottom"/>
     </group>

+ 5 - 5
FGUIProject/assets/poem/PoemPhotoShareUI.xml

@@ -2,14 +2,14 @@
 <component size="1080,1920">
   <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
-    <loader id="n0_v482" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,1920" align="center" vAlign="middle" fill="scaleMatchWidth">
-      <gearDisplay controller="c1" pages="0"/>
-      <relation target="" sidePair="center-center,middle-middle"/>
-    </loader>
     <graph id="n6_wono" name="graBg" xy="0,0" size="1080,1920" alpha="0.6" type="rect" lineSize="0" fillColor="#ff000000">
-      <gearDisplay controller="c1" pages="1"/>
+      <gearDisplay controller="c1" pages="0,1"/>
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </graph>
+    <loader id="n0_v482" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2160" align="center" vAlign="middle" fill="scaleMatchHeight">
+      <gearDisplay controller="c1" pages="0"/>
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </loader>
     <component id="n1_v482" name="btnback" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80">
       <relation target="" sidePair="left-left,top-top"/>
       <Button icon="ui://eg2y0ldpuyuxtj4"/>

+ 3 - 3
FGUIProject/assets/poem/componentsPhoto/ComPhoto.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="994,1600" overflow="hidden" mask="n7_uyux" reversedMask="true">
+<component size="994,1605" overflow="hidden" mask="n7_uyux" reversedMask="true">
   <displayList>
-    <loader id="n5_v482" name="loaPhoto" xy="-3,-88" size="1000,1777" aspect="true" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleMatchWidth">
+    <loader id="n5_v482" name="loaPhoto" xy="-3,-275" size="1000,2156" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
-    <image id="n7_uyux" name="n7" src="uyux100" fileName="imagesPhoto/xc_dakuang.png" xy="-3,-2" size="1000,1607">
+    <image id="n7_uyux" name="n7" src="uyux100" fileName="imagesPhoto/xc_dakuang.png" xy="-3,-2">
       <relation target="" sidePair="width-width,height-height"/>
     </image>
   </displayList>

+ 3 - 3
FGUIProject/assets/poem/componentsPhoto/ListPhotoPreviewItem.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1000,1605">
+<component size="1000,1600" overflow="hidden">
   <displayList>
-    <component id="n5_v482" name="comPhoto" src="uyux105" fileName="components/ComPhoto.xml" xy="3,1" size="994,1602">
+    <component id="n5_v482" name="comPhoto" src="uyux105" fileName="componentsPhoto/ComPhoto.xml" xy="3,1">
       <relation target="" sidePair="width-width,height-height"/>
     </component>
-    <image id="n9_mdd9" name="imgBorder" src="uyux100" fileName="photImages/xc_dakuang.png" xy="0,0" size="1000,1605">
+    <image id="n9_mdd9" name="imgBorder" src="uyux100" fileName="imagesPhoto/xc_dakuang.png" xy="0,0" size="1000,1601">
       <relation target="" sidePair="width-width,height-height"/>
     </image>
   </displayList>

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

@@ -8,8 +8,8 @@ namespace UI.Poem
     {
         public GComponent target;
         public Controller m_c1;
-        public GLoader m_loaBg;
         public GGraph m_graBg;
+        public GLoader m_loaBg;
         public GButton m_btnback;
         public GButton m_btnSave;
         public GButton m_btnShare;
@@ -62,8 +62,8 @@ namespace UI.Poem
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
-            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_graBg = (GGraph)comp.GetChild("graBg");
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_btnback = (GButton)comp.GetChild("btnback");
             m_btnSave = (GButton)comp.GetChild("btnSave");
             m_btnShare = (GButton)comp.GetChild("btnShare");
@@ -72,8 +72,8 @@ namespace UI.Poem
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
-            m_loaBg = null;
             m_graBg = null;
+            m_loaBg = null;
             m_btnback = null;
             m_btnSave = null;
             m_btnShare = null;

+ 1 - 5
GameClient/Assets/Game/HotUpdate/ServerProxy/PoemPhotoSProxy.cs

@@ -30,11 +30,7 @@ namespace GFGGame
                         photoData.LockingStatus = response.PictureInfosA[i].LockingStatus;
                         photoData.SourceType = response.PictureInfosA[i].SourceType;
                         photoData.PictureTempUrl = response.PictureInfosA[i].PictureTempUrl;
-                        // Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(photoData.PictureTempUrl, (Texture2D texture) =>
-                        // {
-                        //     photoData.Bytes = texture.EncodeToJPG();
-                        //     photoData.Ntexture = new NTexture(texture);
-                        // }));
+
                         PoemPhotoDataManager.Instance.Add(photoData, (int)PictureSourceType.PersonalAlbum);
                     }
                     Timers.inst.StartCoroutine(PictureStorageHelper.Download(PoemPhotoDataManager.Instance.PersonalPhotoInfos));

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoPreView.cs

@@ -70,7 +70,7 @@ namespace GFGGame
             {
                 _list = _ui.m_list;
                 _list.numItems = _photoInfos.Count;
-                _list.height = _list.GetChildAt(0).height;
+                // _list.height = _list.GetChildAt(0).height;
             }
             else if (_sourceType == (int)PictureSourceType.WanShuiQianShan)
             {
@@ -125,7 +125,7 @@ namespace GFGGame
             UI_ListPhotoPreviewItem item = UI_ListPhotoPreviewItem.Proxy(obj);
 
             item.m_comPhoto.m_loaPhoto.texture = _photoInfos[index].Ntexture;
-            item.target.SetSize(item.target.width, item.target.initHeight * _ui.target.height / _ui.target.initHeight);
+            // item.target.SetSize(item.target.width, item.target.initHeight * _ui.target.height / _ui.target.initHeight);
 
             UI_ListPhotoPreviewItem.ProxyEnd();
         }

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