Просмотр исходного кода

修复相册无法置顶的bug;修改相册UI

leiyasi 1 год назад
Родитель
Сommit
8d2dfe3c5e

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/VO/PoemPhotoData.cs

@@ -13,12 +13,12 @@ namespace GFGGame
         /// <summary>
         /// 创建时间,毫秒
         /// </summary>
-        public long CreationTime;
+        public long CreationTime { get; set; }
 
         /// <summary>
         /// 置顶状态
         /// </summary>
-        public bool ToppingStatus;
+        public bool ToppingStatus { get; set; }
 
         /// <summary>
         /// 锁定状态

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

@@ -7,6 +7,7 @@ namespace UI.Poem
     public partial class UI_ComPhotoPostcard
     {
         public GComponent target;
+        public Controller m_c1;
         public UI_ComTravel m_comTravel;
         public UI_Button1 m_btnLock;
         public UI_Button2 m_btnUp;
@@ -59,6 +60,7 @@ namespace UI.Poem
 
         private void Init(GComponent comp)
         {
+            m_c1 = comp.GetController("c1");
             m_comTravel = (UI_ComTravel)UI_ComTravel.Create(comp.GetChild("comTravel"));
             m_btnLock = (UI_Button1)UI_Button1.Create(comp.GetChild("btnLock"));
             m_btnUp = (UI_Button2)UI_Button2.Create(comp.GetChild("btnUp"));
@@ -67,6 +69,7 @@ namespace UI.Poem
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_c1 = null;
             m_comTravel.Dispose();
             m_comTravel = null;
             m_btnLock.Dispose();

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

@@ -17,8 +17,8 @@ namespace UI.Poem
         public GList m_typeList;
         public UI_Button7 m_btnConfirmDelete;
         public GButton m_btnRule;
-        public GButton m_btnDelete;
         public GTextField m_txtCount;
+        public GButton m_btnDelete;
         public const string URL = "ui://iyz778gkv4825";
         public const string PACKAGE_NAME = "Poem";
         public const string RES_NAME = "PoemPhotoUI";
@@ -76,8 +76,8 @@ namespace UI.Poem
             m_typeList = (GList)comp.GetChild("typeList");
             m_btnConfirmDelete = (UI_Button7)UI_Button7.Create(comp.GetChild("btnConfirmDelete"));
             m_btnRule = (GButton)comp.GetChild("btnRule");
-            m_btnDelete = (GButton)comp.GetChild("btnDelete");
             m_txtCount = (GTextField)comp.GetChild("txtCount");
+            m_btnDelete = (GButton)comp.GetChild("btnDelete");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -92,8 +92,8 @@ namespace UI.Poem
             m_btnConfirmDelete.Dispose();
             m_btnConfirmDelete = null;
             m_btnRule = null;
-            m_btnDelete = null;
             m_txtCount = null;
+            m_btnDelete = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -126,7 +126,7 @@ namespace GFGGame
                 _photoInfos = PoemPhotoDataManager.Instance.PersonalPhotoInfos;
                 _sourceType = (int)PictureSourceType.PersonalAlbum;
                 _ui.m_list.numItems = _photoInfos.Count;
-                _ui.m_txtCount.text = string.Format("{0}/{1}", _photoInfos.Count, GlobalCfgArray.globalCfg.maxPhotoCount);
+                _ui.m_txtCount.text = string.Format("{0}/{1}", _photoInfos.Count, GlobalCfgArray.globalCfg.maxPhotoCount);
             }
             else
             {
@@ -135,11 +135,11 @@ namespace GFGGame
                 _photoInfos = PoemPhotoDataManager.Instance.WsqsPhotoInfos;
                 _sourceType = (int)PictureSourceType.WanShuiQianShan;
                 _ui.m_listTravel.numItems = _photoInfos.Count;
-                _ui.m_txtCount.text = string.Format("{0}/{1}", _photoInfos.Count, RoleDataManager.WanShuiQianShanMaxStorageCount);
+                _ui.m_txtCount.text = string.Format("{0}/{1}", _photoInfos.Count, RoleDataManager.WanShuiQianShanMaxStorageCount);
             }
 
            
-            _ui.m_btnConfirmDelete.m_txtTitle.text = string.Format("删除({0}/{1})", _listDelete.Count, _photoInfos.Count);
+            _ui.m_btnConfirmDelete.m_txtTitle.text = string.Format("删除 {0}/{1}", _listDelete.Count, _photoInfos.Count);
         }
 
         private void RenderListItem(int index, GObject obj)
@@ -193,7 +193,7 @@ namespace GFGGame
 
             UI_ComPhotoPostcard item = UI_ComPhotoPostcard.Proxy(obj);
 
-            item.m_imgSelect.visible = _ui.m_c2.selectedIndex == 1 && _listDelete.IndexOf(_photoInfos[index].PictureId) >= 0;
+            item.m_c1.selectedIndex = _ui.m_c2.selectedIndex == 1 && _listDelete.IndexOf(_photoInfos[index].PictureId) >= 0 ? 1 : 0;
             item.m_comTravel.m_loaBg.url = ResPathUtil.GetTravelBgPath(loactionCfg.res);
             item.m_comTravel.m_loaRole.url = "";
             if (poemPhotoData.TravelSuitId > 0)
@@ -311,6 +311,7 @@ namespace GFGGame
             }
 
         }
+
         private void OnBtnUpClick(EventContext context)
         {
             if (_ui.m_c2.selectedIndex == 1)

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


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


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