修复字符串扩展模块时间转换方法问题

微调音乐室ui
修复更换字体后左上时间歪了
This commit is contained in:
MrZ626
2021-08-29 17:40:32 +08:00
parent bd9ee49255
commit 51cdf864be
4 changed files with 7 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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