Explorar o código

提交摘星界面适配

leiyasi hai 1 ano
pai
achega
9416cebfa2

+ 18 - 18
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox1.cs

@@ -9,21 +9,21 @@ namespace UI.LuckyBox
         public GComponent target;
         public Controller m_showActivityType;
         public UI_ComModel m_comModel;
-        public GTextField m_txtTsyTime;
-        public GTextField m_txtTime;
-        public GGroup m_grpTime;
-        public GGroup m_grpTitle;
         public UI_Button5 m_btnGiftBag;
         public UI_ComBagTime m_comBagTime;
         public UI_Button5 m_btnShop;
         public UI_Button5 m_btnReward;
-        public GButton m_btnPreview;
-        public GTextField m_txtOwned;
         public UI_comLuckBoxBtn m_comLuckBoxBtn;
         public GTextField m_txtCount;
         public GTextField m_txtHasTime;
         public GGroup m_grpActivityTips;
         public GLoader m_ImgUp;
+        public GTextField m_txtTsyTime;
+        public GTextField m_txtTime;
+        public GGroup m_grpTime;
+        public GGroup m_grpTitle;
+        public GButton m_btnPreview;
+        public GTextField m_txtOwned;
         public const string URL = "ui://drx9d1usduuftcr";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComBox1";
@@ -73,31 +73,27 @@ namespace UI.LuckyBox
         {
             m_showActivityType = comp.GetController("showActivityType");
             m_comModel = (UI_ComModel)UI_ComModel.Create(comp.GetChild("comModel"));
-            m_txtTsyTime = (GTextField)comp.GetChild("txtTsyTime");
-            m_txtTime = (GTextField)comp.GetChild("txtTime");
-            m_grpTime = (GGroup)comp.GetChild("grpTime");
-            m_grpTitle = (GGroup)comp.GetChild("grpTitle");
             m_btnGiftBag = (UI_Button5)UI_Button5.Create(comp.GetChild("btnGiftBag"));
             m_comBagTime = (UI_ComBagTime)UI_ComBagTime.Create(comp.GetChild("comBagTime"));
             m_btnShop = (UI_Button5)UI_Button5.Create(comp.GetChild("btnShop"));
             m_btnReward = (UI_Button5)UI_Button5.Create(comp.GetChild("btnReward"));
-            m_btnPreview = (GButton)comp.GetChild("btnPreview");
-            m_txtOwned = (GTextField)comp.GetChild("txtOwned");
             m_comLuckBoxBtn = (UI_comLuckBoxBtn)UI_comLuckBoxBtn.Create(comp.GetChild("comLuckBoxBtn"));
             m_txtCount = (GTextField)comp.GetChild("txtCount");
             m_txtHasTime = (GTextField)comp.GetChild("txtHasTime");
             m_grpActivityTips = (GGroup)comp.GetChild("grpActivityTips");
             m_ImgUp = (GLoader)comp.GetChild("ImgUp");
+            m_txtTsyTime = (GTextField)comp.GetChild("txtTsyTime");
+            m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_grpTime = (GGroup)comp.GetChild("grpTime");
+            m_grpTitle = (GGroup)comp.GetChild("grpTitle");
+            m_btnPreview = (GButton)comp.GetChild("btnPreview");
+            m_txtOwned = (GTextField)comp.GetChild("txtOwned");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_showActivityType = null;
             m_comModel.Dispose();
             m_comModel = null;
-            m_txtTsyTime = null;
-            m_txtTime = null;
-            m_grpTime = null;
-            m_grpTitle = null;
             m_btnGiftBag.Dispose();
             m_btnGiftBag = null;
             m_comBagTime.Dispose();
@@ -106,14 +102,18 @@ namespace UI.LuckyBox
             m_btnShop = null;
             m_btnReward.Dispose();
             m_btnReward = null;
-            m_btnPreview = null;
-            m_txtOwned = null;
             m_comLuckBoxBtn.Dispose();
             m_comLuckBoxBtn = null;
             m_txtCount = null;
             m_txtHasTime = null;
             m_grpActivityTips = null;
             m_ImgUp = null;
+            m_txtTsyTime = null;
+            m_txtTime = null;
+            m_grpTime = null;
+            m_grpTitle = null;
+            m_btnPreview = null;
+            m_txtOwned = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 7 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -102,6 +102,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            AdaptScreen();
             Debug.Log("OnShown:LuckyBoxView");
             //防止引导检测之前触发点击事件
             GRoot.inst.touchable = false;
@@ -697,5 +698,11 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_btnRight, LuckyBoxDataManager.Instance.RedBtnRight(_curIndex), "", -60, 70);
             UI_ComBox1.ProxyEnd();
         }
+
+        private void AdaptScreen()
+        {
+            float offsetY = _ui.m_grpTop.y + ViewGlobal.GetRealTopOffset();
+            _ui.m_grpTop.SetXY(_ui.m_grpTop.x, offsetY);
+        }
     }
 }

+ 10 - 1
GameClient/Assets/Game/HotUpdate/Views/UIView.cs

@@ -233,7 +233,16 @@ namespace GFGGame
 
         private void MakeFullScreen(GObject ui)
         {
-            MakeUIFullScreen(ui);
+            // 摘星界面特殊处理
+            if (viewName == "LuckyBoxView")
+            {
+                ui.MakeFullScreen();
+            }
+            else
+            {
+                MakeUIFullScreen(ui);
+            }
+            
             ui.AddRelation(GRoot.inst, RelationType.Size);
         }
 

BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes