Browse Source

好友头像

zhaoyang 2 years ago
parent
commit
ea8d6ea3bd

+ 1 - 1
FGUIProject/assets/Friend/components/ListApplyItem.xml

@@ -9,7 +9,7 @@
     <component id="n21_pdeo" name="btnRefuse" src="jdju1" fileName="components/BtnModel1.xml" xy="656,28" size="94,91">
     <component id="n21_pdeo" name="btnRefuse" src="jdju1" fileName="components/BtnModel1.xml" xy="656,28" size="94,91">
       <Button icon="ui://wez2ujnnz73e15"/>
       <Button icon="ui://wez2ujnnz73e15"/>
     </component>
     </component>
-    <component id="n23_z73e" name="n23" src="pdeo3" fileName="components/CompHeadWithBg.xml" xy="40,12" pivot="0.5,0.5" size="124,124"/>
+    <component id="n23_z73e" name="comHead" src="r9ri1h" fileName="components/ComHead.xml" pkg="eg2y0ldp" xy="-6,-41" pivot="0.5,0.5" scale="0.7,0.7"/>
     <image id="n24_z73e" name="n24" src="z73e17" fileName="images/zjm_dj_1.png" xy="127,91" group="n26_z73e"/>
     <image id="n24_z73e" name="n24" src="z73e17" fileName="images/zjm_dj_1.png" xy="127,91" group="n26_z73e"/>
     <text id="n25_z73e" name="txtLvl" xy="134,97" size="29,29" group="n26_z73e" fontSize="20" color="#ffffff" align="center" text="99">
     <text id="n25_z73e" name="txtLvl" xy="134,97" size="29,29" group="n26_z73e" fontSize="20" color="#ffffff" align="center" text="99">
       <relation target="n24_z73e" sidePair="center-center,middle-middle"/>
       <relation target="n24_z73e" sidePair="center-center,middle-middle"/>

+ 4 - 4
FGUIProject/assets/Friend/components/ListSearchItem.xml

@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="905,147">
 <component size="905,147">
-  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c1" pages="0,,1," selected="0"/>
   <controller name="c2" pages="0,,1," selected="0"/>
   <controller name="c2" pages="0,,1," selected="0"/>
   <displayList>
   <displayList>
     <image id="n16_z73e" name="n16" src="z73ex" fileName="images/hy_tjhy_dk.png" xy="0,0"/>
     <image id="n16_z73e" name="n16" src="z73ex" fileName="images/hy_tjhy_dk.png" xy="0,0"/>
-    <component id="n17_z73e" name="n17" src="pdeo3" fileName="components/CompHeadWithBg.xml" xy="40,11" pivot="0.5,0.5" size="124,124"/>
+    <component id="n17_z73e" name="comHead" src="r9ri1h" fileName="components/ComHead.xml" pkg="eg2y0ldp" xy="-6,-41" pivot="0.5,0.5" scale="0.7,0.7"/>
     <image id="n18_z73e" name="n18" src="z73e17" fileName="images/zjm_dj_1.png" xy="127,90" group="n20_z73e"/>
     <image id="n18_z73e" name="n18" src="z73e17" fileName="images/zjm_dj_1.png" xy="127,90" group="n20_z73e"/>
     <text id="n19_z73e" name="txtLvl" xy="134,96" size="29,29" group="n20_z73e" fontSize="20" color="#ffffff" align="center" text="99">
     <text id="n19_z73e" name="txtLvl" xy="134,96" size="29,29" group="n20_z73e" fontSize="20" color="#ffffff" align="center" text="99">
       <relation target="n18_z73e" sidePair="center-center,middle-middle"/>
       <relation target="n18_z73e" sidePair="center-center,middle-middle"/>
     </text>
     </text>
     <group id="n20_z73e" name="n20" xy="127,90" size="42,43"/>
     <group id="n20_z73e" name="n20" xy="127,90" size="42,43"/>
-    <text id="n9_pdeo" name="txtName" xy="174,10" size="295,56" fontSize="42" color="#bb996c" text="角色名字七个字"/>
+    <text id="n9_pdeo" name="txtName" xy="192,10" size="295,56" fontSize="42" color="#bb996c" text="角色名字七个字"/>
     <component id="n13_pdeo" name="btnAdd" src="jdju1" fileName="components/BtnModel1.xml" xy="738,26" size="94,94">
     <component id="n13_pdeo" name="btnAdd" src="jdju1" fileName="components/BtnModel1.xml" xy="738,26" size="94,94">
       <gearDisplay controller="c1" pages="0"/>
       <gearDisplay controller="c1" pages="0"/>
       <Button icon="ui://wez2ujnnz73e1b"/>
       <Button icon="ui://wez2ujnnz73e1b"/>
@@ -18,7 +18,7 @@
     <image id="n21_z73e" name="n21" src="z73ez" fileName="images/hy_ysqysq.png" xy="696,40">
     <image id="n21_z73e" name="n21" src="z73ez" fileName="images/hy_ysqysq.png" xy="696,40">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay controller="c1" pages="1"/>
     </image>
     </image>
-    <loader id="n22_nfg4" name="loaState" xy="180,99" size="100,28" url="ui://wez2ujnnz73eu" autoSize="true">
+    <loader id="n22_nfg4" name="loaState" xy="196,99" size="100,28" url="ui://wez2ujnnz73eu" autoSize="true">
       <gearIcon controller="c2" pages="1" values="ui://wez2ujnnz73ek" default="ui://wez2ujnnz73eu"/>
       <gearIcon controller="c2" pages="1" values="ui://wez2ujnnz73ek" default="ui://wez2ujnnz73eu"/>
     </loader>
     </loader>
   </displayList>
   </displayList>

+ 0 - 71
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_CompHead.cs

@@ -1,71 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Friend
-{
-    public partial class UI_CompHead
-    {
-        public GComponent target;
-        public GLoader m_icon;
-        public const string URL = "ui://wez2ujnnpdeo5";
-        public const string PACKAGE_NAME = "Friend";
-        public const string RES_NAME = "CompHead";
-        private static UI_CompHead _proxy;
-
-        public static UI_CompHead Create(GObject gObject = null)
-        {
-            var ui = new UI_CompHead();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_CompHead Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_CompHead();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_icon = (GLoader)comp.GetChild("icon");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_icon = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_CompHead.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 61c31007694ba36409643e635c34a266
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListApplyItem.cs

@@ -10,6 +10,7 @@ namespace UI.Friend
         public GTextField m_txtName;
         public GTextField m_txtName;
         public GButton m_btnAgree;
         public GButton m_btnAgree;
         public GButton m_btnRefuse;
         public GButton m_btnRefuse;
+        public GComponent m_comHead;
         public GTextField m_txtLvl;
         public GTextField m_txtLvl;
         public const string URL = "ui://wez2ujnnpdeoj";
         public const string URL = "ui://wez2ujnnpdeoj";
         public const string PACKAGE_NAME = "Friend";
         public const string PACKAGE_NAME = "Friend";
@@ -61,6 +62,7 @@ namespace UI.Friend
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnAgree = (GButton)comp.GetChild("btnAgree");
             m_btnAgree = (GButton)comp.GetChild("btnAgree");
             m_btnRefuse = (GButton)comp.GetChild("btnRefuse");
             m_btnRefuse = (GButton)comp.GetChild("btnRefuse");
+            m_comHead = (GComponent)comp.GetChild("comHead");
             m_txtLvl = (GTextField)comp.GetChild("txtLvl");
             m_txtLvl = (GTextField)comp.GetChild("txtLvl");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
@@ -68,6 +70,7 @@ namespace UI.Friend
             m_txtName = null;
             m_txtName = null;
             m_btnAgree = null;
             m_btnAgree = null;
             m_btnRefuse = null;
             m_btnRefuse = null;
+            m_comHead = null;
             m_txtLvl = null;
             m_txtLvl = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListSearchItem.cs

@@ -9,6 +9,7 @@ namespace UI.Friend
         public GComponent target;
         public GComponent target;
         public Controller m_c1;
         public Controller m_c1;
         public Controller m_c2;
         public Controller m_c2;
+        public GComponent m_comHead;
         public GTextField m_txtLvl;
         public GTextField m_txtLvl;
         public GTextField m_txtName;
         public GTextField m_txtName;
         public GButton m_btnAdd;
         public GButton m_btnAdd;
@@ -62,6 +63,7 @@ namespace UI.Friend
         {
         {
             m_c1 = comp.GetController("c1");
             m_c1 = comp.GetController("c1");
             m_c2 = comp.GetController("c2");
             m_c2 = comp.GetController("c2");
+            m_comHead = (GComponent)comp.GetChild("comHead");
             m_txtLvl = (GTextField)comp.GetChild("txtLvl");
             m_txtLvl = (GTextField)comp.GetChild("txtLvl");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnAdd = (GButton)comp.GetChild("btnAdd");
             m_btnAdd = (GButton)comp.GetChild("btnAdd");
@@ -71,6 +73,7 @@ namespace UI.Friend
         {
         {
             m_c1 = null;
             m_c1 = null;
             m_c2 = null;
             m_c2 = null;
+            m_comHead = null;
             m_txtLvl = null;
             m_txtLvl = null;
             m_txtName = null;
             m_txtName = null;
             m_btnAdd = null;
             m_btnAdd = null;

+ 10 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

@@ -54,6 +54,8 @@ namespace ET
             roleInfo.roleName = message.FriendInfo.RoleInfo.RoleName;
             roleInfo.roleName = message.FriendInfo.RoleInfo.RoleName;
             roleInfo.roleLv = message.FriendInfo.RoleInfo.RoleLvl;
             roleInfo.roleLv = message.FriendInfo.RoleInfo.RoleLvl;
             roleInfo.offlineTimeSec = message.FriendInfo.RoleInfo.OfflineTimeSec;
             roleInfo.offlineTimeSec = message.FriendInfo.RoleInfo.OfflineTimeSec;
+            roleInfo.roleHead = message.FriendInfo.RoleInfo.HeadItemId;
+            roleInfo.roleHeadBorder = message.FriendInfo.RoleInfo.HeadBorderItemId;
 
 
             FriendInfoData friendInfo = new FriendInfoData();
             FriendInfoData friendInfo = new FriendInfoData();
             friendInfo.roleInfo = roleInfo;
             friendInfo.roleInfo = roleInfo;
@@ -81,6 +83,8 @@ namespace ET
                 roleInfo.roleName = message.FriendList[i].RoleInfo.RoleName;
                 roleInfo.roleName = message.FriendList[i].RoleInfo.RoleName;
                 roleInfo.roleLv = message.FriendList[i].RoleInfo.RoleLvl;
                 roleInfo.roleLv = message.FriendList[i].RoleInfo.RoleLvl;
                 roleInfo.offlineTimeSec = message.FriendList[i].RoleInfo.OfflineTimeSec;
                 roleInfo.offlineTimeSec = message.FriendList[i].RoleInfo.OfflineTimeSec;
+                roleInfo.roleHead = message.FriendList[i].RoleInfo.HeadItemId;
+                roleInfo.roleHeadBorder = message.FriendList[i].RoleInfo.HeadBorderItemId;
 
 
                 FriendInfoData friendInfo = new FriendInfoData();
                 FriendInfoData friendInfo = new FriendInfoData();
                 friendInfo.roleInfo = roleInfo;
                 friendInfo.roleInfo = roleInfo;
@@ -143,6 +147,8 @@ namespace GFGGame
                         roleInfo.roleName = response.FriendList[i].RoleInfo.RoleName;
                         roleInfo.roleName = response.FriendList[i].RoleInfo.RoleName;
                         roleInfo.roleLv = response.FriendList[i].RoleInfo.RoleLvl;
                         roleInfo.roleLv = response.FriendList[i].RoleInfo.RoleLvl;
                         roleInfo.offlineTimeSec = response.FriendList[i].RoleInfo.OfflineTimeSec;
                         roleInfo.offlineTimeSec = response.FriendList[i].RoleInfo.OfflineTimeSec;
+                        roleInfo.roleHead = response.FriendList[i].RoleInfo.HeadItemId;
+                        roleInfo.roleHeadBorder = response.FriendList[i].RoleInfo.HeadBorderItemId;
 
 
                         FriendInfoData friendInfo = new FriendInfoData();
                         FriendInfoData friendInfo = new FriendInfoData();
                         friendInfo.roleInfo = roleInfo;
                         friendInfo.roleInfo = roleInfo;
@@ -280,6 +286,8 @@ namespace GFGGame
                         roleInfo.roleName = response.RoleList[i].RoleName;
                         roleInfo.roleName = response.RoleList[i].RoleName;
                         roleInfo.roleLv = response.RoleList[i].RoleLvl;
                         roleInfo.roleLv = response.RoleList[i].RoleLvl;
                         roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
                         roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
+                        roleInfo.roleHead = response.RoleList[i].HeadItemId;
+                        roleInfo.roleHeadBorder = response.RoleList[i].HeadBorderItemId;
                         FriendDataManager.Instance.AddSearchData(roleInfo);
                         FriendDataManager.Instance.AddSearchData(roleInfo);
                     }
                     }
                     return true;
                     return true;
@@ -305,6 +313,8 @@ namespace GFGGame
                         roleInfo.roleName = response.RoleList[i].RoleName;
                         roleInfo.roleName = response.RoleList[i].RoleName;
                         roleInfo.roleLv = response.RoleList[i].RoleLvl;
                         roleInfo.roleLv = response.RoleList[i].RoleLvl;
                         roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
                         roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
+                        roleInfo.roleHead = response.RoleList[i].HeadItemId;
+                        roleInfo.roleHeadBorder = response.RoleList[i].HeadBorderItemId;
                         FriendDataManager.Instance.AddRecommendData(roleInfo);
                         FriendDataManager.Instance.AddRecommendData(roleInfo);
                     }
                     }
                     return true;
                     return true;

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendAddView.cs

@@ -85,6 +85,7 @@ namespace GFGGame
             OtherRoleInfoData roleInfoData = _searchDatas[index];
             OtherRoleInfoData roleInfoData = _searchDatas[index];
 
 
             UI_ListSearchItem item = UI_ListSearchItem.Proxy(obj);
             UI_ListSearchItem item = UI_ListSearchItem.Proxy(obj);
+            RoleInfoManager.Instance.UpdateHead(item.m_comHead, roleInfoData.roleHead, roleInfoData.roleHeadBorder);
             item.m_txtName.text = roleInfoData.roleName;
             item.m_txtName.text = roleInfoData.roleName;
             item.m_txtLvl.text = roleInfoData.roleLv.ToString();
             item.m_txtLvl.text = roleInfoData.roleLv.ToString();
             item.m_c1.selectedIndex = 0;
             item.m_c1.selectedIndex = 0;
@@ -170,6 +171,7 @@ namespace GFGGame
         {
         {
             FriendInfoData data = FriendDataManager.Instance.ApplyDatas[index];
             FriendInfoData data = FriendDataManager.Instance.ApplyDatas[index];
             UI_ListApplyItem item = UI_ListApplyItem.Proxy(obj);
             UI_ListApplyItem item = UI_ListApplyItem.Proxy(obj);
+            RoleInfoManager.Instance.UpdateHead(item.m_comHead, data.roleInfo.roleHead, data.roleInfo.roleHeadBorder);
             item.m_txtName.text = data.roleInfo.roleName;
             item.m_txtName.text = data.roleInfo.roleName;
             item.m_txtLvl.text = data.roleInfo.roleLv.ToString();
             item.m_txtLvl.text = data.roleInfo.roleLv.ToString();
             if (item.m_btnAgree.data == null)
             if (item.m_btnAgree.data == null)

BIN
GameClient/Assets/ResIn/UI/Friend/Friend_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes