From 51cdf864be5f2bf0f655c362bc062c0aa9f63b9d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 29 Aug 2021 17:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=A8=A1=E5=9D=97=E6=97=B6=E9=97=B4=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E6=96=B9=E6=B3=95=E9=97=AE=E9=A2=98=20=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=E9=9F=B3=E4=B9=90=E5=AE=A4ui=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=AD=97=E4=BD=93=E5=90=8E=E5=B7=A6=E4=B8=8A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=AD=AA=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/font.lua | 2 +- Zframework/init.lua | 2 +- Zframework/stringExtend.lua | 4 ++-- parts/scenes/music.lua | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Zframework/font.lua b/Zframework/font.lua index ab9d99aa..cc80a7c6 100644 --- a/Zframework/font.lua +++ b/Zframework/font.lua @@ -13,7 +13,7 @@ function FONT.set(s) currentFontSize=s end end -function FONT.get(s)print(1) +function FONT.get(s) if not fontCache[s]then fontCache[s]=gc.setNewFont(s,'light',gc.getDPIScale()*SCR.k*2) end diff --git a/Zframework/init.lua b/Zframework/init.lua index 7168b795..5695012b 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -127,7 +127,7 @@ local function updatePowerInfo() gc_draw(batteryImg,58,3) end FONT.set(25) - gc_print(os.date("%H:%M"),5,-2) + gc_print(os.date("%H:%M"),5,-3) gc_pop() gc.setCanvas() end diff --git a/Zframework/stringExtend.lua b/Zframework/stringExtend.lua index 768d33c3..736edb28 100644 --- a/Zframework/stringExtend.lua +++ b/Zframework/stringExtend.lua @@ -62,9 +62,9 @@ function STRING.time(t) if t<60 then return format("%.3f\"",t) elseif t<3600 then - return format("%d'%05.2f\"",int(t/60),int(t%60)) + return format("%d'%05.2f\"",int(t/60),t%60) else - return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),int(t%60)) + return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),t%60) end end diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index bb18a2db..6a5987a4 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -80,7 +80,7 @@ function scene.draw() gc.print(BGM.nowPlay,710,508) setFont(35) gc.setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5) - gc.print(author[BGM.nowPlay]or"MrZ",680,465) + gc.print(author[BGM.nowPlay]or"MrZ",670,465) local a=-t%2.3/2 if a<1 then @@ -92,7 +92,7 @@ function scene.draw() gc.setColor(COLOR.Z) local cur=BGM.playing:tell() local dur=BGM.playing:getDuration() - gc.print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),500,626) + gc.print(STRING.time_simp(cur%dur).." / "..STRING.time_simp(dur),480,626) end end @@ -100,7 +100,7 @@ scene.widgetList={ WIDGET.newText{name="title", x=30,y=30,font=80,align='L'}, WIDGET.newText{name="arrow", x=270,y=360,font=45,align='L'}, WIDGET.newText{name="now", x=700,y=500,font=50,align='R',hideF=function()return not BGM.nowPlay end}, - WIDGET.newSlider{name="slide",x=500,y=600,w=400, + WIDGET.newSlider{name="slide",x=480,y=600,w=400, disp=function()return BGM.playing:tell()/BGM.playing:getDuration()%1 end, show=false, code=function(v)BGM.playing:seek(v*BGM.playing:getDuration())end,