Browse Source

个人相册

zhaoyang 2 năm trước cách đây
mục cha
commit
72187124b5

+ 1 - 1
FGUIProject/assets/RoleInfo/components/ListPhotoItem.xml

@@ -2,7 +2,7 @@
 <component size="448,590">
   <displayList>
     <image id="n48_r9ri" name="n48" src="volsgh" fileName="images/grxc_db.png" xy="0,0"/>
-    <image id="n50_vols" name="n50" src="volsgi" fileName="images/tb_jiahao.png" xy="122,193"/>
+    <image id="n50_vols" name="imgNone" src="volsgi" fileName="images/tb_jiahao.png" xy="122,193"/>
     <component id="n49_r9ri" name="comPhoto" src="r9ri1o" fileName="components/ComPhoto.xml" xy="2,2" size="444,586"/>
     <image id="n55_vols" name="n55" src="miy37t" fileName="imagesNew/tb_suo.png" pkg="eg2y0ldp" xy="202,249" group="n54_vols"/>
     <image id="n51_vols" name="n51" src="9jv65m" fileName="imagesNew/lm_dt_zsx1.png" pkg="eg2y0ldp" xy="13,287" group="n54_vols"/>

+ 4 - 4
FGUIProject/assets/RoleInfo/components/ListPhotoItem1.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="512,740">
   <displayList>
-    <component id="n1_r9ri" name="comIcon" src="r9ri1q" fileName="components/ComIcon.xml" xy="0,0"/>
-    <image id="n2_r9ri" name="n2" src="r9ri1t" fileName="images/xc_kuangdi.png" xy="0,0"/>
-    <text id="n3_r9ri" name="txtTime" xy="88,691" pivot="0.5,0" size="335,49" fontSize="36" color="#aa8c61" align="center" text="2022-1-8 17:14:30"/>
-    <image id="n4_r9ri" name="imgOtherSelect" src="r9ri1s" fileName="images/xc_xzxd.png" xy="0,0"/>
+    <component id="n1_r9ri" name="comIcon" src="r9ri1q" fileName="components/ComIcon.xml" xy="0,1"/>
+    <image id="n2_r9ri" name="n2" src="r9ri1t" fileName="images/xc_kuangdi.png" xy="0,0" size="512,696"/>
+    <text id="n3_r9ri" name="txtTime" xy="110,691" pivot="0.5,0" size="290,49" fontSize="36" color="#aa8c61" align="center" text="2022-1-8 17:14:30"/>
+    <image id="n4_r9ri" name="imgOtherSelect" src="r9ri1s" fileName="images/xc_xzxd.png" xy="0,0" size="512,695"/>
     <image id="n5_oqa1" name="imgSelect" src="oqa1g1" fileName="images/xc_qxxzxd.png" xy="0,0"/>
   </displayList>
 </component>

+ 2 - 2
FGUIProject/assets/RoleInfo/package.xml

@@ -62,8 +62,8 @@
     <component id="r9ri1o" name="ComPhoto.xml" path="/components/"/>
     <component id="r9ri1p" name="Button5.xml" path="/components/"/>
     <component id="r9ri1q" name="ComIcon.xml" path="/components/"/>
-    <image id="r9ri1s" name="xc_xzxd.png" path="/images/"/>
-    <image id="r9ri1t" name="xc_kuangdi.png" path="/images/"/>
+    <image id="r9ri1s" name="xc_xzxd.png" path="/images/" scale="9grid" scale9grid="128,173,256,346"/>
+    <image id="r9ri1t" name="xc_kuangdi.png" path="/images/" scale="9grid" scale9grid="128,173,256,346"/>
     <component id="r9ri1v" name="ListPhotoItem1.xml" path="/components/"/>
     <image id="r9ri1w" name="xc_xczi.png" path="/images/"/>
     <image id="r9ri1x" name="hl_sczpxzdik.png" path="/images/" scale="9grid" scale9grid="146,20,292,40"/>

+ 35 - 0
GameClient/Assets/Game/HotUpdate/Data/RoleInfoManager.cs

@@ -218,5 +218,40 @@ namespace GFGGame
             comLv.m_txtLvl.text = lv > 0 ? lv.ToString() : "--";
             UI_ComHeadLv.ProxyEnd();
         }
+
+        public static string[] GetSuitPosItems()
+        {
+            MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege4);
+            string[] posItems = new string[GlobalCfgArray.globalCfg.freeAlbumNum + privilegeCfg.value1Arr[0] + privilegeCfg.value2Arr[0]];
+            for (int i = 0; i < posItems.Length; i++)
+            {
+                posItems[i] = "";
+                if (GetPosType(i) == 0)
+                {
+                    posItems[i] = "";
+                }
+                else if (GetPosType(i) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold))
+                {
+                    posItems[i] = "金卡开启";
+                }
+                else if (GetPosType(i) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
+                {
+                    posItems[i] = "黑金卡开启";
+                }
+            }
+            return posItems;
+        }
+
+        //获取指定位置月卡类型
+        public static int GetPosType(int pos)
+        {
+            if (pos < GlobalCfgArray.globalCfg.freeAlbumNum) return 0;
+
+            MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege4);
+            if (pos < GlobalCfgArray.globalCfg.freeAlbumNum + privilegeCfg.value1Arr[0]) return MonthCardType.Gold;
+            if (pos >= GlobalCfgArray.globalCfg.freeAlbumNum + privilegeCfg.value1Arr[0]) return MonthCardType.BlackGold;
+
+            return 0;
+        }
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RoleInfo/UI_ListPhotoItem.cs

@@ -7,6 +7,7 @@ namespace UI.RoleInfo
     public partial class UI_ListPhotoItem
     {
         public GComponent target;
+        public GImage m_imgNone;
         public UI_ComPhoto m_comPhoto;
         public GTextField m_txtLock;
         public GGroup m_grpLock;
@@ -57,12 +58,14 @@ namespace UI.RoleInfo
 
         private void Init(GComponent comp)
         {
+            m_imgNone = (GImage)comp.GetChild("imgNone");
             m_comPhoto = (UI_ComPhoto)UI_ComPhoto.Create(comp.GetChild("comPhoto"));
             m_txtLock = (GTextField)comp.GetChild("txtLock");
             m_grpLock = (GGroup)comp.GetChild("grpLock");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_imgNone = null;
             m_comPhoto.Dispose();
             m_comPhoto = null;
             m_txtLock = null;

+ 20 - 1
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/RoleInfoView.cs

@@ -112,9 +112,17 @@ namespace GFGGame
             long pictureId = RoleDataManager.photoDatas[index];
             PoemPhotoData poemPhotoData = pictureId == 0 ? null : PoemPhotoDataManager.Instance.GetPersonalPhotoDataById(pictureId);
             UI_ListPhotoItem item = UI_ListPhotoItem.Proxy(obj);
+            item.target.data = index;
 
+            item.m_imgNone.visible = poemPhotoData == null;
+            item.m_grpLock.visible = false;
+            if (RoleInfoManager.GetPosType(index) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold)
+            || RoleInfoManager.GetPosType(index) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
+            {
+                item.m_grpLock.visible = true;
+                return;
+            }
             item.m_comPhoto.m_loaPhoto.texture = poemPhotoData == null ? null : poemPhotoData.Ntexture;
-            item.target.data = index;
             UI_ListPhotoItem.ProxyEnd();
         }
 
@@ -122,6 +130,17 @@ namespace GFGGame
         {
             GObject obj = context.data as GObject;
             int index = (int)obj.data;
+            if (RoleInfoManager.GetPosType(index) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("金卡开启");
+                return;
+            }
+            if (RoleInfoManager.GetPosType(index) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("黑金卡开启");
+                return;
+            }
+
             ViewManager.Show<PersonalPhotoView>(index, new object[] { typeof(RoleInfoView).FullName, this.viewData });
             this.Hide();
         }

BIN
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes