From 04721fe715354e1deb50507e7b0d001922adf00a Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 6 Apr 2021 17:42:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID1008672=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E9=80=8D=E9=81=A5=E6=B8=B8=E4=BC=98=E5=8C=96=E3=80=91=E8=A7=A3?= =?UTF-8?q?=E9=94=81=E4=B8=8A=E6=96=B9=E7=9A=84=E5=9C=B0=E5=9B=BE=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=BF=9B=E5=85=A5=E9=80=89=E6=8B=A9=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=BB=9A=E5=8A=A8=E8=87=B3=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E5=85=A5=E5=8F=A3=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/XiaoYao/XiaoYaoManager.lua | 1 + .../~Lua/Modules/XiaoYao/XiaoYaoYouPanel.lua | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoManager.lua b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoManager.lua index 41e96812d1..1bd78535a8 100644 --- a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoManager.lua @@ -29,6 +29,7 @@ end function this.GetOpenMapData(func) NetManager.JourneyGetInfoResponse(function (msg) local _data={} + LogGreen("#msg.infos:"..#msg.infos) for i = 1, #msg.infos do _data[msg.infos[i].mapId]={} _data[msg.infos[i].mapId].process=msg.infos[i].process diff --git a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoYouPanel.lua b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoYouPanel.lua index 18f14ce63c..5d86e98a6b 100644 --- a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoYouPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoYouPanel.lua @@ -130,7 +130,13 @@ function this.ScrollToBottom() local dheight = cheight - vheight -- 判断滚动到最下面的条件 local pos = this.content.transform.anchoredPosition3D - this.content.transform.anchoredPosition3D = Vector3(pos.x, dheight, 0) + LogGreen("#data:"..LengthOfTable(XiaoYaoManager.allMapData)) + if LengthOfTable(XiaoYaoManager.allMapData) >= 7 then + this.content.transform.anchoredPosition3D = Vector3(pos.x, 0, 0) + else + this.content.transform.anchoredPosition3D = Vector3(pos.x, dheight, 0) + end + end --刷新每一条的显示数据