Selaa lähdekoodia

红点位置优化

zhaoyang 3 vuotta sitten
vanhempi
commit
2edfb3c7bf

+ 2 - 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, string res = "", int left = 0, int right = 0, int top = 0, int bottom = 0)
+        public void SetComRedDot(GComponent parentCom, bool isRed, string res = "", int left = 0, int top = 0)
         {
             GComponent comRedDot;
 
@@ -26,7 +26,7 @@ namespace GFGGame
                 }
                 parentCom.AddChild(comRedDot);
                 comRedDot.name = "comResDot";
-                comRedDot.SetPosition(parentCom.width - comRedDot.width - left + right, bottom - top, 0);
+                comRedDot.SetPosition(parentCom.width - comRedDot.width + left, 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);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/DailyTask/DailyTaskView.cs

@@ -137,7 +137,7 @@ namespace GFGGame
             int state = DailyTaskDataManager.Instance.GetBoxStateById(cfg.id);
             item.m_c1.selectedIndex = state;
             item.m_txtNum.text = cfg.count.ToString();
-            RedDotController.Instance.SetComRedDot(item.target, state == ConstBonusStatus.CAN_GET, "", 0, 20, 0, 8);
+            RedDotController.Instance.SetComRedDot(item.target, state == ConstBonusStatus.CAN_GET, "", 12, 4);
 
             item.target.data = _rewardCfgs[index];
             UI_ListBoxRewardItem.ClearProxy();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/FieldGuideView.cs

@@ -93,7 +93,7 @@ namespace GFGGame
             listItem.m_loaderPic.url = "ui://FieldGuide/tujian_tup_" + id;
             listItem.target.data = id;
             bool red = actions[index]();
-            RedDotController.Instance.SetComRedDot(listItem.target, red, "", 20);
+            RedDotController.Instance.SetComRedDot(listItem.target, red, "", 10);
         }
 
         private void OnClickListBannerItem(EventContext context)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/SuitGuideView.cs

@@ -199,7 +199,7 @@ namespace GFGGame
             bool haveSuit = DressUpMenuSuitDataManager.CheckHaveSuit(suitId);
             listItem.m_imgLock.visible = listItem.m_imgLockBg.visible = !haveSuit;
             int status = DressUpMenuSuitDataManager.GetSuitGuideBonusStatus(suitId);
-            RedDotController.Instance.SetComRedDot(listItem.target, status == ConstBonusStatus.CAN_GET, "", 0, 4, 0, 402);
+            RedDotController.Instance.SetComRedDot(listItem.target, status == ConstBonusStatus.CAN_GET, "", 4, 402);
             if (status == ConstBonusStatus.CAN_GET)
             {
                 listItem.m_loaderBonusBox.url = "ui://FieldGuide/tujian_lw_1";

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterListView.cs

@@ -118,7 +118,7 @@ namespace GFGGame
             }
             listItem.target.data = chapterCfg.id;
             listItem.m_content.target.data = chapterCfg.id;
-            RedDotController.Instance.SetComRedDot(listItem.m_content.target, RedDotDataManager.Instance.GetChapterRed(chapterCfg.id), "", 0, 8, 0, (int)listItem.m_content.m_txtProgress.y - 20);
+            RedDotController.Instance.SetComRedDot(listItem.m_content.target, RedDotDataManager.Instance.GetChapterRed(chapterCfg.id), "", 0, (int)listItem.m_content.m_txtProgress.y - 20);
         }
 
         private void UpdateList()

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

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