Эх сурвалжийг харах

添加剧情回顾的置顶/置底

leiyasi 1 жил өмнө
parent
commit
ea22d6812a

+ 15 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLookBackView.cs

@@ -41,16 +41,20 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            
             _ui.m_content.m_txtContent.text = "";
+
+            bool needScrollBottom = false;
             if (this.viewData is string)
             {
-                string stroyStartID = (string)this.viewData;
+                string storyStartID = (string)this.viewData;
                 _dialogListLookBack = new List<string>();
-                ShowNextStep(stroyStartID);
+                ShowNextStep(storyStartID);
             }
             else
             {
                 _dialogListLookBack = (List<string>)this.viewData;
+                needScrollBottom = true;
             }
 
             if (_dialogListLookBack != null)
@@ -63,6 +67,15 @@ namespace GFGGame
                 _ui.m_content.m_txtContent.text = content;
                 _ui.m_content.m_txtContent.height = _ui.m_content.m_txtContent.textHeight;
             }
+
+            if (needScrollBottom)
+            {
+                _ui.m_content.target.scrollPane.ScrollBottom();
+            }
+            else
+            {
+                _ui.m_content.target.scrollPane.ScrollTop();
+            }
         }
 
         protected override void OnHide()

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes