浏览代码

添加界面打开时顶部滑块的位置刷新

leiyasi 1 年之前
父节点
当前提交
f998f82b8f

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_SuitGuideUI.cs

@@ -14,6 +14,7 @@ namespace UI.FieldGuide
         public GList m_suitTypeList;
         public UI_SuitTypeItems m_suitTypeItems;
         public GList m_suitType2Items;
+        public Transition m_t0;
         public const string URL = "ui://vqq9h9h4z3os0";
         public const string PACKAGE_NAME = "FieldGuide";
         public const string RES_NAME = "SuitGuideUI";
@@ -68,6 +69,7 @@ namespace UI.FieldGuide
             m_suitTypeList = (GList)comp.GetChild("suitTypeList");
             m_suitTypeItems = (UI_SuitTypeItems)UI_SuitTypeItems.Create(comp.GetChild("suitTypeItems"));
             m_suitType2Items = (GList)comp.GetChild("suitType2Items");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -79,6 +81,7 @@ namespace UI.FieldGuide
             m_suitTypeItems.Dispose();
             m_suitTypeItems = null;
             m_suitType2Items = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -25,7 +25,6 @@ namespace UI.RoleInfo
         public UI_Button19 m_btnLogout;
         public UI_Button20 m_btnGiftCode;
         public GButton m_btnExchange;
-        public Transition m_changePageType;
         public Transition m_suit;
         public const string URL = "ui://374k3dwvr9ri1";
         public const string PACKAGE_NAME = "RoleInfo";
@@ -92,7 +91,6 @@ namespace UI.RoleInfo
             m_btnLogout = (UI_Button19)UI_Button19.Create(comp.GetChild("btnLogout"));
             m_btnGiftCode = (UI_Button20)UI_Button20.Create(comp.GetChild("btnGiftCode"));
             m_btnExchange = (GButton)comp.GetChild("btnExchange");
-            m_changePageType = comp.GetTransition("changePageType");
             m_suit = comp.GetTransition("suit");
         }
         public void Dispose(bool disposeTarget = false)
@@ -120,7 +118,6 @@ namespace UI.RoleInfo
             m_btnGiftCode.Dispose();
             m_btnGiftCode = null;
             m_btnExchange = null;
-            m_changePageType = null;
             m_suit = null;
             if(disposeTarget && target != null)
             {

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

@@ -55,6 +55,8 @@ namespace GFGGame
             if (_needRefresh)
             {
                 _needRefresh = false;
+                // 让滑块直接置于最左边
+                _ui.m_t0.Play();
                 UpdateItemsByType(1);
             }
             UpdateListSuitTypeRedDots();
@@ -211,7 +213,6 @@ namespace GFGGame
         private void OnClickBtnBack()
         {
             _needRefresh = true;
-            _ui.m_c1.SetSelectedIndex(0);
             _ui.m_suitTypeItems.target.scrollPane.ScrollTop();
             Hide();
         }

+ 1 - 12
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/SettingView.cs

@@ -62,17 +62,6 @@ namespace GFGGame
             _ui.m_gameProtectAgree.onClick.Add(OnGameProtectAgreeClick);
             _ui.m_privacyAgree.onClick.Add(OnPrivacyAgreeClick);
             _ui.m_childrenAgree.onClick.Add(OnChildrenAgreeClick);
-            _ui.m_c1.onChanged.Add(() =>
-            {
-                if (_ui.m_c1.selectedIndex == 0)
-                {
-                    _ui.m_changePageType.PlayReverse();
-                }
-                else
-                {
-                    _ui.m_changePageType.Play();
-                }
-            });
         }
 
         protected override void OnShown()
@@ -82,8 +71,8 @@ namespace GFGGame
             if (_refresh)
             {
                 _refresh = false;
-                _ui.m_c1.SetSelectedIndex(0);
                 _ui.m_suit.Play();
+                _ui.m_c1.SetSelectedIndex(0);
             }
         }
 

二进制
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_fui.bytes


二进制
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes