zhaoyang 3 жил өмнө
parent
commit
1616119491

+ 3 - 1
FGUIProject/assets/CommonGame/components/ComRedDot.xml

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="32,32" opaque="false">
   <displayList>
-    <image id="n5_hspq" name="imgRed" src="oq7r9k" fileName="imagesExport/zx_hogndian.png" xy="0,0"/>
+    <loader id="n6_hspq" name="loaIcon" xy="0,0" size="32,32" url="ui://eg2y0ldpoq7r9k" autoSize="true">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </loader>
   </displayList>
 </component>

+ 0 - 0
FGUIProject/assets/Notice/images/gg_gg_hdhdgth.png → FGUIProject/assets/CommonGame/imagesExport/gg_gg_hdhdgth.png


+ 1 - 0
FGUIProject/assets/CommonGame/package.xml

@@ -194,6 +194,7 @@
     <image id="kztethr" name="hyhy_btbt_1.png" path="/imagesExport/" exported="true"/>
     <image id="kzteths" name="gxhd_scjlscjl.png" path="/images/"/>
     <component id="hspqf4" name="ComRedDot.xml" path="/components/" exported="true"/>
+    <image id="kjq37" name="gg_gg_hdhdgth.png" path="/imagesExport/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 1 - 1
FGUIProject/assets/Notice/components/ListActivityItem.xml

@@ -3,7 +3,7 @@
   <displayList>
     <loader id="n6_kjq3" name="loaShow" xy="2,28" size="906,289"/>
     <image id="n8_kjq3" name="n8" src="kjq38" fileName="images/gg_gg_tupdi.png" xy="2,28"/>
-    <image id="n9_kjq3" name="imgTips" src="kjq37" fileName="images/gg_gg_hdhdgth.png" xy="870,0"/>
+    <image id="n9_kjq3" name="imgTips" src="kjq37" fileName="images/gg_gg_hdhdgth.png" xy="870,0" pkg="eg2y0ldp"/>
     <image id="n10_kjq3" name="n10" src="kjq31" fileName="images/gg_gg_tupk.png" xy="7,221"/>
     <text id="n11_kjq3" name="txtTime" xy="45,232" size="408,56" fontSize="42" color="#83683e" text="限时:20天30时50分"/>
   </displayList>

+ 1 - 2
FGUIProject/assets/Notice/components/ListNoticeItem.xml

@@ -2,10 +2,9 @@
 <component size="927,184">
   <displayList>
     <image id="n10_kjq3" name="n10" src="kjq3g" fileName="images/gg_gg_xtxtk.png" xy="0,26" group="n15_kjq3"/>
-    <image id="n14_kjq3" name="imgTips" src="kjq37" fileName="images/gg_gg_hdhdgth.png" xy="870,0" group="n15_kjq3"/>
     <text id="n11_kjq3" name="txtTitle" xy="42,75" size="256,59" group="n15_kjq3" fontSize="44" color="#bb996c" text="主题350678"/>
     <text id="n12_kjq3" name="txtTime" xy="426,80" size="181,49" group="n15_kjq3" fontSize="36" color="#c8aa84" text="2022/8/8"/>
     <component id="n13_kjq3" name="btnGo" src="kjq3n" fileName="components/Button2.xml" xy="684,67" group="n15_kjq3"/>
-    <group id="n15_kjq3" name="n15" xy="0,0" size="927,183"/>
+    <group id="n15_kjq3" name="n15" xy="0,26" size="915,157"/>
   </displayList>
 </component>

+ 0 - 1
FGUIProject/assets/Notice/package.xml

@@ -7,7 +7,6 @@
     <image id="kjq34" name="gg_gg_anniu_3.png" path="/images/"/>
     <image id="kjq35" name="gg_gg_anniu_4.png" path="/images/"/>
     <image id="kjq36" name="gg_gg_dtpian.png" path="/images/"/>
-    <image id="kjq37" name="gg_gg_hdhdgth.png" path="/images/"/>
     <image id="kjq38" name="gg_gg_tupdi.png" path="/images/"/>
     <image id="kjq39" name="gg_gg_tpkqw_2.png" path="/images/"/>
     <image id="kjq3a" name="gg_gg_fhfh.png" path="/images/"/>

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Controller/RedDotController.cs

@@ -8,7 +8,7 @@ namespace GFGGame
     {
         private List<GComponent> comRedDotPool = new List<GComponent>();
 
-        public void SetComRedDot(GComponent parentCom, bool isRed)
+        public void SetComRedDot(GComponent parentCom, bool isRed, string res = "", int left = 0, int right = 0, int top = 0, int bottom = 0)
         {
             GComponent comRedDot;
 
@@ -26,9 +26,10 @@ namespace GFGGame
                 }
                 parentCom.AddChild(comRedDot);
                 comRedDot.name = "comResDot";
-                comRedDot.SetPosition(parentCom.width - comRedDot.width, 0, 0);
+                comRedDot.SetPosition(parentCom.width - comRedDot.width - left + right, bottom - top, 0);
                 comRedDot.AddRelation(comRedDot, RelationType.TopExt_Top);
                 comRedDot.AddRelation(comRedDot, RelationType.RightExt_Right);
+                comRedDot.GetChild("loaIcon").asLoader.url = ResPathUtil.GetCommonGameResPath(res == "" ? "zx_hogndian" : res);
             }
             else
             {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComRedDot.cs

@@ -7,7 +7,7 @@ namespace UI.CommonGame
     public partial class UI_ComRedDot
     {
         public GComponent target;
-        public GImage m_imgRed;
+        public GLoader m_loaIcon;
         public const string URL = "ui://eg2y0ldphspqf4";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComRedDot";
@@ -55,11 +55,11 @@ namespace UI.CommonGame
 
         private void Init(GComponent comp)
         {
-            m_imgRed = (GImage)comp.GetChild("imgRed");
+            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_imgRed = null;
+            m_loaIcon = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 0 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Notice/UI_ListNoticeItem.cs

@@ -7,7 +7,6 @@ namespace UI.Notice
     public partial class UI_ListNoticeItem
     {
         public GComponent target;
-        public GImage m_imgTips;
         public GTextField m_txtTitle;
         public GTextField m_txtTime;
         public GButton m_btnGo;
@@ -58,14 +57,12 @@ namespace UI.Notice
 
         private void Init(GComponent comp)
         {
-            m_imgTips = (GImage)comp.GetChild("imgTips");
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_btnGo = (GButton)comp.GetChild("btnGo");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_imgTips = null;
             m_txtTitle = null;
             m_txtTime = null;
             m_btnGo = null;

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Notice/NoticeView.cs

@@ -89,7 +89,8 @@ namespace GFGGame
             UI_ListNoticeItem item = UI_ListNoticeItem.Proxy(obj);
             item.m_txtTitle.text = noticeInfo.title;
             item.m_txtTime.text = TimeUtil.FormattingTime(noticeInfo.time);
-            item.m_imgTips.visible = !noticeInfo.readStatus;
+            // item.m_imgTips.visible = !noticeInfo.readStatus;
+            RedDotController.Instance.SetComRedDot(item.target, !noticeInfo.readStatus, "gg_gg_hdhdgth", 13, 0, 0, 12);
             if (item.m_btnGo.data == null)
             {
                 item.m_btnGo.onClick.Add(OnListNoticeBtnGoClick);

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Notice/Notice_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Notice/Notice_fui.bytes