框架新增setDebugInfo方法,原来的左下角debug信息可外部自定义

This commit is contained in:
MrZ626
2021-12-28 17:43:17 +08:00
parent 0ce3c7f9bc
commit 939b32129d
2 changed files with 36 additions and 9 deletions

View File

@@ -184,6 +184,12 @@ Z.setOnFnKeys({
function()for k,v in next,_G do print(k,v)end end,
function()if love['_openConsole']then love['_openConsole']()end end,
})
Z.setDebugInfo{
{"Cache",gcinfo},
{"Tasks",TASK.getCount},
{"Voices",VOC.getQueueCount},
{"Audios",love.audio.getSourceCount},
}
Z.setOnResize(function(w,_)
SHADER.warning:send('w',w*SCR.dpi)
end)