From c57c9a972f4ad92b422910227b133493d2978410 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 7 Jan 2021 22:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=9C=BA=E6=99=AF=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/history.lua | 8 +++++--- parts/updateLog.lua | 21 ++------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/parts/scenes/history.lua b/parts/scenes/history.lua index e83df119..75739c73 100644 --- a/parts/scenes/history.lua +++ b/parts/scenes/history.lua @@ -21,9 +21,9 @@ function scene.wheelMoved(_,y) end function scene.keyDown(key) if key=="up"then - scrollPos=max(scrollPos-1,1) + scrollPos=max(scrollPos-6,1) elseif key=="down"then - scrollPos=min(scrollPos+1,#texts) + scrollPos=min(scrollPos+6,#texts-22) elseif key=="escape"then SCN.back() end @@ -36,7 +36,9 @@ function scene.draw() gc.setLineWidth(4) gc.rectangle("line",30,45,1000,632) setFont(20) - gc.print(texts[scrollPos],40,50) + for i=0,22 do + gc.print(texts[scrollPos+i],40,50+27*i) + end end scene.widgetList={ diff --git a/parts/updateLog.lua b/parts/updateLog.lua index 5f32b0cb..3b9c0a21 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -1,5 +1,4 @@ -local S=[=[ -"Patron"(time ordered, may not accurate): +return splitStr([=[ <<<<<<<<<>>>>>>>>> ★☆白羽☆★ <<>> @@ -1357,20 +1356,4 @@ local S=[=[ GUI position editted grid BG changed smarter AI -]=] - -local find,sub=string.find,string.sub -local L,c={},0--List, \n counter, -local p,p1=1,0--Cut start/end pos -local EOF=#S - -while true do - p1=find(S,"\n",p1+1) - c=c+1 - if c==23 or p1==EOF then - L[#L+1]=sub(S,p,p1-1) - if p1==EOF then return L end - p=p1+1 - c=0 - end -end \ No newline at end of file +]=],"\n") \ No newline at end of file