zhaoyang 2 жил өмнө
parent
commit
25567698a8

+ 3 - 3
FGUIProject/assets/poem/PoemGalleryUI.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="1,,2,,4," selected="2"/>
+  <controller name="c1" pages="1,,2,,4," selected="0"/>
   <displayList>
     <loader id="n0_r9ri" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
@@ -18,13 +18,13 @@
     </component>
     <image id="n24_r9ri" name="n24" src="r9ri12k" fileName="imagesGallery/hl_xz_ddik_1.png" xy="0,1736" group="n25_r9ri"/>
     <component id="n2_r9ri" name="btnRecover" src="r9ri12l" fileName="componentsGallery/Button11.xml" xy="0,1710" group="n25_r9ri">
-      <Button title="首页" icon="ui://iyz778gkr9ri11l" selectedIcon="ui://iyz778gkr9ri11c" controller="c1" page="1"/>
+      <Button checked="true" title="首页" icon="ui://iyz778gkr9ri11l" selectedIcon="ui://iyz778gkr9ri11c" controller="c1" page="1"/>
     </component>
     <component id="n3_r9ri" name="btnJoin" src="r9ri12l" fileName="componentsGallery/Button11.xml" xy="357,1710" group="n25_r9ri">
       <Button title="投稿" icon="ui://iyz778gkr9ri11j" selectedIcon="ui://iyz778gkr9ri11k" controller="c1" page="2"/>
     </component>
     <component id="n4_r9ri" name="btnFavorites" src="r9ri12l" fileName="componentsGallery/Button11.xml" xy="714,1710" group="n25_r9ri">
-      <Button checked="true" title="收藏" icon="ui://iyz778gkr9ri11i" selectedIcon="ui://iyz778gkr9ri11v" controller="c1" page="4"/>
+      <Button title="收藏" icon="ui://iyz778gkr9ri11i" selectedIcon="ui://iyz778gkr9ri11v" controller="c1" page="4"/>
     </component>
     <group id="n25_r9ri" name="n25" xy="0,1710" size="1080,210" advanced="true">
       <relation target="" sidePair="bottom-bottom"/>

+ 8 - 8
FGUIProject/assets/poem/componentsGallery/ComFavorites.xml

@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1336">
-  <controller name="c1" pages="0,,1," selected="0"/>
+<component size="1080,1336" opaque="false">
+  <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
-    <image id="n23_r9ri" name="n23" src="uyuxzx" fileName="imagesPhoto/xc_xzdik.png" xy="131,2" size="560,76" group="n27_r9ri"/>
-    <component id="n24_r9ri" name="btnTab0" src="11rzzf" fileName="componentsPhoto/Button6.xml" xy="131,0" group="n27_r9ri">
-      <Button checked="true" title="我的收藏" selectedIcon="ui://iyz778gkuyuxzw" controller="c1" page="0"/>
+    <image id="n23_r9ri" name="n23" src="uyuxzx" fileName="imagesPhoto/xc_xzdik.png" xy="289,2" size="502,76" group="n27_r9ri"/>
+    <component id="n24_r9ri" name="btnTab0" src="11rzzf" fileName="componentsPhoto/Button6.xml" xy="289,0" group="n27_r9ri">
+      <Button icon="ui://iyz778gkr9ri11p" selectedIcon="ui://iyz778gkr9ri11h" controller="c1" page="0"/>
     </component>
-    <component id="n25_r9ri" name="btnTab1" src="11rzzf" fileName="componentsPhoto/Button6.xml" xy="411,0" group="n27_r9ri">
-      <Button title="我的作品" selectedIcon="ui://iyz778gkuyuxzw" controller="c1" page="1"/>
+    <component id="n25_r9ri" name="btnTab1" src="11rzzf" fileName="componentsPhoto/Button6.xml" xy="540,0" group="n27_r9ri">
+      <Button checked="true" icon="ui://iyz778gkr9ri11o" selectedIcon="ui://iyz778gkr9ri11g" controller="c1" page="1"/>
     </component>
-    <group id="n27_r9ri" name="grpTab" xy="131,0" size="560,82"/>
+    <group id="n27_r9ri" name="grpTab" xy="289,0" size="502,83"/>
     <list id="n28_r9ri" name="listFavorite" xy="24,174" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w">
       <gearDisplay controller="c1" pages="0"/>
       <item/>

+ 7 - 12
FGUIProject/assets/poem/componentsGallery/ComHead.xml

@@ -1,18 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="200,113">
-  <controller name="c1" pages="0,,1,,2," selected="0"/>
+<component size="160,79">
   <displayList>
-    <movieclip id="n30_r9ri" name="n30" src="r9ri119" fileName="componentsGallery/MovieClip1.jta" xy="0,0" group="n34_r9ri">
-      <gearDisplay controller="c1" pages="1"/>
-    </movieclip>
-    <image id="n32_r9ri" name="n32" src="ly9g1d" fileName="imagesExport/cj_xhua.png" pkg="eg2y0ldp" xy="51,-9" pivot="0.5,0.5" group="n34_r9ri" rotation="90">
-      <gearDisplay controller="c1" pages="0"/>
-    </image>
-    <image id="n33_r9ri" name="n33" src="ly9g1d" fileName="imagesExport/cj_xhua.png" pkg="eg2y0ldp" xy="51,-9" pivot="0.5,0.5" group="n34_r9ri" rotation="-90">
-      <gearDisplay controller="c1" pages="2"/>
-    </image>
-    <group id="n34_r9ri" name="n34" xy="0,-9" size="200,132" advanced="true">
+    <image id="n35_r9ri" name="n35" src="r9ri12t" fileName="imagesGallery/hl_jzhjz.png" xy="1,16" pivot="0.5,0.5" group="n37_r9ri"/>
+    <image id="n36_r9ri" name="n36" src="r9ri12s" fileName="imagesGallery/hl_jzhjz_1.png" xy="65,23" group="n37_r9ri"/>
+    <group id="n37_r9ri" name="n37" xy="1,16" size="159,46" advanced="true">
       <relation target="" sidePair="center-center,bottom-bottom"/>
     </group>
   </displayList>
+  <transition name="t0" autoPlay="true" autoPlayRepeat="-1">
+    <item time="0" type="Rotation" target="n35_r9ri" tween="true" startValue="0" endValue="360" duration="18" ease="Linear"/>
+  </transition>
 </component>

+ 2 - 2
FGUIProject/assets/poem/componentsGallery/ComHeadIcon.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="124,125" mask="n9_r9ri">
   <displayList>
-    <image id="n9_r9ri" name="n9" src="r9ri122" fileName="imagesGallery/hl_txkuang.png" xy="7,6" size="108,109" aspect="true"/>
-    <loader id="n10_r9ri" name="loaicon" xy="14,15" size="95,95" aspect="true" url="ui://mfvz4q8kkubi7e" fill="scale"/>
+    <image id="n9_r9ri" name="n9" src="r9ri122" fileName="imagesGallery/hl_txkuang.png" xy="6,6" size="111,111" aspect="true"/>
+    <loader id="n10_r9ri" name="loaicon" xy="12,13" size="99,99" aspect="true" url="ui://mfvz4q8kkubi7e" fill="scale"/>
   </displayList>
 </component>

+ 9 - 6
FGUIProject/assets/poem/componentsGallery/ComNormal.xml

@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1619" overflow="hidden">
+<component size="1080,1619" overflow="hidden" opaque="false">
   <controller name="c1" pages="0,,1,,2," selected="0"/>
   <displayList>
     <component id="n11_r9ri" name="btnShop" src="r9ri10v" fileName="componentsGallery/Button9.xml" xy="900,56" size="180,113">
+      <gearDisplay controller="c1" pages="0,1"/>
       <Button icon="ui://iyz778gkr9ri11t"/>
     </component>
-    <component id="n24_r9ri" name="btnReward" src="r9ri10v" fileName="componentsGallery/Button9.xml" xy="460,30" size="77,76">
-      <gearDisplay controller="c1" pages="0"/>
-      <Button title="奖励" icon="ui://iyz778gkuyuxzp"/>
+    <component id="n24_r9ri" name="btnReward" src="r9ri10v" fileName="componentsGallery/Button9.xml" xy="954,75" size="72,72">
+      <gearDisplay controller="c1" pages="2"/>
+      <Button icon="ui://iyz778gkr9ri12q"/>
     </component>
     <image id="n5_r9ri" name="n5" src="uyuxzx" fileName="imagesPhoto/xc_xzdik.png" xy="165,206" size="750,76" group="n8_r9ri"/>
     <component id="n6_r9ri" name="btnTab0" src="11rzzf" fileName="componentsPhoto/Button6.xml" xy="163,204" group="n8_r9ri">
@@ -23,13 +24,15 @@
     <image id="n25_r9ri" name="n25" src="r9ri11e" fileName="imagesGallery/hl_xzbtzt.png" xy="310,309" group="n26_r9ri"/>
     <text id="n22_r9ri" name="txtTheme" xy="355,315" pivot="0.5,0" size="364,54" group="n26_r9ri" fontSize="40" color="#b08a5d" text="本期主题:风花雪月"/>
     <group id="n26_r9ri" name="n26" xy="310,309" size="499,81"/>
-    <list id="n14_r9ri" name="listRecommend" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" ptrRes="ui://iyz778gkr9ri12p," lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
+    <list id="n14_r9ri" name="listRecommend" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" ptrRes="ui://iyz778gkr9ri12p," lineGap="17" colGap="28" lineItemCount="2" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
       <gearDisplay controller="c1" pages="0"/>
       <relation target="" sidePair="top-top,bottomext-bottom"/>
       <item/>
       <item/>
       <item/>
       <item/>
+      <item/>
+      <item/>
     </list>
     <list id="n21_r9ri" name="listFriend" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w">
       <gearDisplay controller="c1" pages="1"/>
@@ -59,7 +62,7 @@
       <gearDisplay controller="c1" pages="2"/>
     </text>
     <image id="n30_r9ri" name="n30" src="r9ri12o" fileName="imagesGallery/hl_ddandik.png" xy="391,660" group="n32_r9ri"/>
-    <text id="n31_r9ri" name="n31" xy="231,783" size="617,52" group="n32_r9ri" fontSize="38" color="#ac9b7f" text="排行榜数据正在结算中,请稍后再来!"/>
+    <text id="n31_r9ri" name="n31" xy="231,783" size="617,51" group="n32_r9ri" fontSize="38" color="#ac9b7f" text="排行榜数据正在结算中,请稍后再来!"/>
     <group id="n32_r9ri" name="grpResult" xy="231,660" size="617,298" advanced="true">
       <gearDisplay controller="c1" pages="2"/>
       <relation target="" sidePair="center-center,middle-middle"/>

+ 1 - 0
FGUIProject/assets/poem/componentsGallery/ComRoleHead.xml

@@ -3,6 +3,7 @@
   <displayList>
     <image id="n10_r9ri" name="n10" src="r9ri122" fileName="imagesGallery/hl_txkuang.png" xy="0,0"/>
     <component id="n9_r9ri" name="n9" src="r9ri12n" fileName="componentsGallery/ComHeadIcon.xml" xy="0,0"/>
+    <image id="n14_r9ri" name="n14" src="r9ri12r" fileName="imagesGallery/hl_txkuang1.png" xy="0,0"/>
     <image id="n11_r9ri" name="n11" src="wg7t8w" fileName="images/zjm_dj_1.png" pkg="mfvz4q8k" xy="82,82" group="n13_r9ri"/>
     <text id="n12_r9ri" name="txtLvl" xy="89,88" size="29,29" group="n13_r9ri" fontSize="20" color="#ffffff" align="center" text="99">
       <relation target="n11_r9ri" sidePair="center-center,middle-middle"/>

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

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="500,644">
+<component size="500,630">
   <displayList>
-    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,567" url="ui://iyz778gkuyux102" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true"/>
-    <image id="n21_r9ri" name="n21" src="r9ri12h" fileName="imagesGallery/hl_cjkuangdi.png" xy="0,0" size="500,649">
+    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,550" url="ui://iyz778gkuyux102" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true"/>
+    <image id="n21_r9ri" name="n21" src="r9ri12h" fileName="imagesGallery/hl_cjkuangdi.png" xy="0,0" size="500,633">
       <relation target="n15_r9ri" sidePair="height-height"/>
     </image>
-    <text id="n16_r9ri" name="txtName" xy="20,585" size="187,42" group="n22_r9ri" font="ui://eg2y0ldpkst18" fontSize="30" color="#ac9370" leading="0" letterSpacing="-4" text="名字名字名字啊"/>
-    <component id="n19_r9ri" name="btnCollect" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="276,591" group="n22_r9ri">
+    <text id="n16_r9ri" name="txtName" xy="20,568" size="187,41" group="n22_r9ri" font="ui://eg2y0ldpkst18" fontSize="30" color="#ac9370" leading="0" letterSpacing="-4" text="名字名字名字啊"/>
+    <component id="n19_r9ri" name="btnCollect" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="276,574" group="n22_r9ri">
       <Button title="50000" icon="ui://iyz778gkr9ri128" selectedIcon="ui://iyz778gkr9ri127"/>
     </component>
-    <component id="n20_r9ri" name="btnVote" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="386,591" group="n22_r9ri">
+    <component id="n20_r9ri" name="btnVote" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="386,574" group="n22_r9ri">
       <Button title="50000" icon="ui://iyz778gkr9ri124" selectedIcon="ui://iyz778gkr9ri123"/>
     </component>
-    <group id="n22_r9ri" name="n22" xy="20,585" size="398,42" advanced="true">
+    <group id="n22_r9ri" name="n22" xy="20,568" size="398,42" advanced="true">
       <relation target="n15_r9ri" sidePair="top-bottom"/>
     </group>
   </displayList>

BIN
FGUIProject/assets/poem/imagesGallery/hl_gthgt.png


BIN
FGUIProject/assets/poem/imagesGallery/hl_jzhjz.png


BIN
FGUIProject/assets/poem/imagesGallery/hl_jzhjz_1.png


BIN
FGUIProject/assets/poem/imagesGallery/hl_txkuang1.png


+ 4 - 0
FGUIProject/assets/poem/package.xml

@@ -111,6 +111,10 @@
     <component id="r9ri12n" name="ComHeadIcon.xml" path="/componentsGallery/"/>
     <image id="r9ri12o" name="hl_ddandik.png" path="/imagesGallery/"/>
     <component id="r9ri12p" name="ComHead.xml" path="/componentsGallery/"/>
+    <image id="r9ri12q" name="hl_gthgt.png" path="/imagesGallery/"/>
+    <image id="r9ri12r" name="hl_txkuang1.png" path="/imagesGallery/"/>
+    <image id="r9ri12s" name="hl_jzhjz_1.png" path="/imagesGallery/"/>
+    <image id="r9ri12t" name="hl_jzhjz.png" path="/imagesGallery/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Poem" packageCount="2" genCode="true"/>
 </packageDescription>

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/PoemGalleryDataManager.cs

@@ -25,7 +25,7 @@ namespace GFGGame
             }
         }
 
-        private long _themeId = 0;
+        private long _themeId = 1;
         /// <summary>
         /// 主题配置id
         /// </summary>

+ 12 - 12
GameClient/Assets/Game/HotUpdate/Data/VO/PoemGalleryData.cs

@@ -8,51 +8,51 @@ namespace GFGGame
         /// <summary>
         /// 作品id
         /// </summary>
-        public long WorkId;
+        public long WorkId = 0;
         /// <summary>
         /// 作者id
         /// </summary>
-        public long AuthorId;
+        public long AuthorId = 0;
         /// <summary>
         /// 作者名字
         /// </summary>
-        public string AuthorName;
+        public string AuthorName = "";
         /// <summary>
         /// 点赞投票次数
         /// </summary>
-        public long VoteCount;
+        public long VoteCount = 0;
         /// <summary>
         /// 被收藏次数
         /// </summary>
-        public long CollectCount;
+        public long CollectCount = 0;
         /// <summary>
         /// 是否点赞
         /// </summary>
-        public bool VoteOrNot;
+        public bool VoteOrNot = false;
         /// <summary>
         /// 是否收藏
         /// </summary>
-        public bool CollectOrNot;
+        public bool CollectOrNot = false;
         /// <summary>
         /// 创建时间,单位:毫秒
         /// </summary>
-        public long CreateTime;
+        public long CreateTime = 0;
         /// <summary>
         /// 主题期数
         /// </summary>
-        public long ThemeOrder;
+        public long ThemeOrder = 0;
         /// <summary>
         /// 主题配置id
         /// </summary>
-        public long ThemeId;
+        public long ThemeId = 1;
         /// <summary>
         /// 临时下载路径
         /// </summary>
-        public string PictureTempUrl;
+        public string PictureTempUrl = "";
         /// <summary>
         /// 作品资源
         /// </summary>
-        public NTexture Ntexture;
+        public NTexture Ntexture = null;
 
     }
 }

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

@@ -7,7 +7,7 @@ namespace UI.Poem
     public partial class UI_ComHead
     {
         public GComponent target;
-        public Controller m_c1;
+        public Transition m_t0;
         public const string URL = "ui://iyz778gkr9ri12p";
         public const string PACKAGE_NAME = "Poem";
         public const string RES_NAME = "ComHead";
@@ -55,11 +55,11 @@ namespace UI.Poem
 
         private void Init(GComponent comp)
         {
-            m_c1 = comp.GetController("c1");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_c1 = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/PoemGallerySProxy.cs

@@ -80,7 +80,7 @@ namespace GFGGame
                             list.Add(data);
                             if (list.Count == response.StartIndex + response.WorksList.Count - 1)
                             {
-
+                                EventAgent.DispatchEvent(ConstMessage.GALLERY_DATA_CHANGE);
                             }
                         }));
                     }
@@ -233,7 +233,7 @@ namespace GFGGame
                             list.Add(data);
                             if (list.Count == response.RankList.Count)
                             {
-
+                                EventAgent.DispatchEvent(ConstMessage.GALLERY_RANK_DATA_CHANGE);
                             }
                         }));
                     }

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -86,5 +86,16 @@ namespace GFGGame
 
             return str;
         }
+        /// <summary>
+        /// 将时间戳转换成MM/dd格式
+        /// </summary>
+        /// <param name="timeSec"></param>
+        public static string FormattingTime3(long timeSec)
+        {
+            DateTime date = TimeInfo.Instance.ToDateTime(timeSec);
+            string str = date.ToString("MM/dd");
+
+            return str;
+        }
     }
 }

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

@@ -13,6 +13,8 @@ namespace GFGGame
         private List<PoemGalleryData> _galleryDatas = new List<PoemGalleryData>();
         private int _sortType = 0;//由GallerySortType定义
         private int _pageCount = 10;
+        private int _tabIndex = 0;//当前选中大页签下标,首页0投稿1收藏2
+        private int _subtabIndex = 0;//当前选中小页签下标,推荐0好友1排行榜2;我的收藏0我的作品1
 
         public override void Dispose()
         {
@@ -42,7 +44,6 @@ namespace GFGGame
             _ui.m_comNormal.m_listRecommend.itemRenderer = RenderListItem;
             _ui.m_comNormal.m_listRecommend.SetVirtual();
             _ui.m_comNormal.m_listRecommend.scrollPane.onPullDownRelease.Add(onPullDownRelease);
-            _ui.m_comNormal.m_listRecommend.scrollPane.header.onSizeChanged.Add(OnSizeChanged);
             _ui.m_comNormal.m_listRecommend.scrollPane.onScroll.Add(onScroll);
 
             _ui.m_comNormal.m_listFriend.itemRenderer = RenderListItem;
@@ -82,14 +83,35 @@ namespace GFGGame
         {
             base.OnShown();
 
+            _tabIndex = 0;
+            _subtabIndex = 0;
+            if (this.viewData != null)
+            {
+                _tabIndex = (int)(this.viewData as object[])[0];
+                _subtabIndex = (int)(this.viewData as object[])[1];
+            }
+            _ui.m_c1.selectedIndex = _tabIndex;
+
+            if (_tabIndex == 0)
+            {
+                _ui.m_comNormal.m_c1.selectedIndex = _subtabIndex;
+                OnNormalTabChange();
+            }
+            else if (_tabIndex == 2)
+            {
+                _ui.m_comFavorites.m_c1.selectedIndex = _subtabIndex;
+                OnFavoritesTabChange();
+            }
             _list = _ui.m_comNormal.m_listRecommend;
-            _list.numItems = 4;
+            _list.numItems = 10;
+            UpdateView();
         }
 
         protected override void OnHide()
         {
             base.OnHide();
             ResetPullDownRelease();
+            _ui.m_comNormal.m_comBoBox.selectedIndex = 0;
         }
 
         protected override void RemoveEventListener()
@@ -103,20 +125,15 @@ namespace GFGGame
         {
             ViewManager.GoBackFrom(typeof(PoemGalleryView).FullName);
         }
-        /// <summary>
-        /// 投稿
-        /// </summary>
-        private void OnBtnJoinClick()
-        {
-            ViewManager.Show<DressUpView>(1, new object[] { typeof(PoemGalleryView).FullName, this.viewData }, true);
-        }
+
+
 
         /// <summary>
         /// 首页
         /// </summary>
         private void OnBtnRecoverClick()
         {
-
+            _tabIndex = _ui.m_c1.selectedIndex;
             if (_ui.m_comNormal.m_c1.selectedIndex == 0)
             {
                 onPullDownRelease();
@@ -129,10 +146,22 @@ namespace GFGGame
         }
 
         /// <summary>
+        /// 投稿
+        /// </summary>
+        private void OnBtnJoinClick()
+        {
+            // int tabIndex = _ui.m_c1.selectedIndex;
+            // int subType = _ui.m_c1.selectedIndex
+            object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex };
+            ViewManager.Show<DressUpView>(1, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas }, true);
+        }
+
+        /// <summary>
         ///收藏夹 
         /// </summary>
         private void OnBtnFavoritesClick()
         {
+            _tabIndex = _ui.m_c1.selectedIndex;
             if (_ui.m_comFavorites.m_c1.selectedIndex != 0)
             {
                 _ui.m_comFavorites.m_c1.selectedIndex = 0;
@@ -176,6 +205,7 @@ namespace GFGGame
         {
             ResetPullDownRelease();
 
+            _subtabIndex = _ui.m_comNormal.m_c1.selectedIndex;
             if (_ui.m_comNormal.m_c1.selectedIndex == 2)//排行榜
             {
 
@@ -208,12 +238,14 @@ namespace GFGGame
 
                 ReqGalleryList(0);
             }
+
         }
         /// <summary>
         /// 切换收藏页签
         /// </summary>
         private void OnFavoritesTabChange()
         {
+            _subtabIndex = _ui.m_comFavorites.m_c1.selectedIndex;
             if (_ui.m_comFavorites.m_c1.selectedIndex == 0)//我的收藏
             {
                 _sortType = (int)GallerySortType.MyCollect;
@@ -228,11 +260,13 @@ namespace GFGGame
             }
             if (_list.numItems > 0) _list.ScrollToView(0);
             ReqGalleryList(0);
+
         }
 
         //分页刷新
         private void onScroll()
         {
+            if (_list == null) return;
             int itemIndex = _list.ChildIndexToItemIndex(0);
             int startIndex = itemIndex + 1;
             if (startIndex >= _list.numItems && startIndex % _pageCount == 0)
@@ -250,11 +284,12 @@ namespace GFGGame
         private void UpdateGalleryList()
         {
             _list.numItems = _galleryDatas.Count;
-
+            UpdateView();
         }
         private void UpdateGalleryRankList()
         {
             _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
+            UpdateView();
         }
 
 
@@ -263,10 +298,10 @@ namespace GFGGame
         /// </summary>
         private void OnBtnShopClick()
         {
-            ViewManager.Show<ClothingShopView>(new object[] { ConstStoreId.GALLERY_STORE_ID }, new object[] { typeof(PoemGalleryView).FullName, this.viewData }, true);
+            object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex };
+            ViewManager.Show<ClothingShopView>(new object[] { ConstStoreId.GALLERY_STORE_ID }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas }, true);
         }
 
-
         /// <summary>
         /// 排行榜奖励
         /// </summary>
@@ -275,11 +310,45 @@ namespace GFGGame
             ViewManager.Show<PoemGalleryRewardView>(null, new object[] { typeof(PoemGalleryView).FullName, this.viewData });
         }
 
+        private void UpdateView()
+        {
+            GalleryThemeCfg themeCfg = GalleryThemeCfgArray.Instance.GetCfg((int)PoemGalleryDataManager.Instance.ThemeId);
+            _ui.m_comNormal.m_txtTheme.text = string.Format("本期主题:{0}", themeCfg.theme);
+            long monday = TimeUtil.GetCurWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);//本周一5点
+            long startTime = 0;
+            long endTime = 0;
+            if ((TimeInfo.Instance.ServerNow() / 1000) < monday)//本周一5点之前显示上周
+            {
+                startTime = TimeUtil.GetLastWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);
+                endTime = TimeUtil.GetLastWeekSundayTime("23:59:59");
+            }
+            else
+            {
+                startTime = monday * 1000;
+                endTime = TimeUtil.GetCurWeekSundayTime("23:59:59") * 1000; ;
+            }
+            string strStartTime = TimeUtil.FormattingTime3(startTime);
+            string strEndTime = TimeUtil.FormattingTime3(endTime); ;
+
+            _ui.m_comNormal.m_txtTime.text = string.Format("截止日期:{0}至{1}", strStartTime, strEndTime);
+            _ui.m_comNormal.m_txtRank.text = string.Format("我的排名:{0}", PoemGalleryDataManager.Instance.MyRank);
+        }
         private void RenderListItem(int index, GObject obj)
         {
             // PoemGalleryData data = _galleryDatas[index];
-            // UI_ListItem item = UI_ListItem.Proxy(obj);
-
+            UI_ListItem item = UI_ListItem.Proxy(obj);
+            // item.m_loaIcon.height = 550 + Random.Range(40, 100);
+            // if (index > 1)
+            // {
+            //     item.target.y=
+            // }
+            // item.target.height = item.m_loaIcon.height + 80;
+            // item.m_loaIcon.texture = data.Ntexture;
+            // item.m_txtName.text = data.AuthorName;
+            // item.m_btnCollect.title = data.CollectCount.ToString();
+            // item.m_btnCollect.selected = data.CollectOrNot;
+            // item.m_btnVote.title = data.VoteCount.ToString();
+            // item.m_btnVote.selected = data.VoteOrNot;
 
             // if (item.m_loaIcon.data == null)
             // {
@@ -296,7 +365,7 @@ namespace GFGGame
             //     item.m_btnVote.onClick.Add(OnBtnVoteClick);
             // }
             // item.m_btnVote.data = data;
-            // UI_ListItem.ProxyEnd();
+            UI_ListItem.ProxyEnd();
 
         }
 
@@ -336,28 +405,21 @@ namespace GFGGame
             // ReqGalleryList(0);
 
             GComponent header = _ui.m_comNormal.m_listRecommend.scrollPane.header;
-            Controller controller = header.GetController("c1");
-            controller.selectedIndex = 1;
+            if (header.height < header.sourceHeight) return;
+            // Transition transition = header.GetTransition("t0");
+            // transition.Play();
+            // controller.selectedIndex = 1;
             _ui.m_comNormal.m_listRecommend.scrollPane.LockHeader(header.sourceHeight);
             Timers.inst.Add(2, 1, OnTimeComplete);
         }
         private void OnTimeComplete(object param)
         {
             GComponent header = _ui.m_comNormal.m_listRecommend.scrollPane.header;
-            // Controller controller = header.GetController("c1");
-            header.GetController("c1").selectedIndex = 2;
+            Transition transition = header.GetTransition("t0");
+            transition.Stop();
+            // header.GetController("c1").selectedIndex = 2;
             _ui.m_comNormal.m_listRecommend.scrollPane.LockHeader(0);
         }
-        private void OnSizeChanged()
-        {
-            GComponent header = _ui.m_comNormal.m_listRecommend.scrollPane.header;
-            Controller controller = _ui.m_comNormal.m_listRecommend.scrollPane.header.GetController("c1");
-
-            if (header.height <= 1)
-            {
-                controller.selectedIndex = 0;
-            }
-        }
 
         /// <summary>
         /// 重置下拉刷新状态

BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0.png


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