This commit is contained in:
OTCv8
2020-06-09 18:19:20 +02:00
parent 76d6f2ce7d
commit 541e189d3f
154 changed files with 2540 additions and 1221 deletions

View File

@@ -57,7 +57,7 @@ function terminate()
removeEvent(monitorEvent)
end
function onMiniWindowClose()
function onClose()
statsButton:setOn(false)
end
@@ -67,6 +67,8 @@ function toggle()
statsButton:setOn(false)
else
statsWindow:show()
statsWindow:raise()
statsWindow:focus()
statsButton:setOn(true)
end
end
@@ -173,7 +175,7 @@ function update()
return
end
statsWindow.debugPanel.sleepTime:setText("Sleep: " .. math.round(g_stats.getSleepTime() / math.max(1, g_clock.micros() - lastSleepTimeReset), 2) .. "%, Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
statsWindow.debugPanel.sleepTime:setText("GFPS: " .. g_app.getGraphicsFps() .. " PFPS: " .. g_app.getProcessingFps() .. " Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
statsWindow.debugPanel.luaRamUsage:setText("Ram usage by lua: " .. gcinfo() .. " kb")
local adaptive = "Adaptive: " .. g_adaptiveRenderer.getLevel() .. " | " .. g_adaptiveRenderer.getDebugInfo()
adaptiveRender:setText(adaptive)

View File

@@ -24,6 +24,12 @@ MainWindow
margin: 0 0 0 0
padding: 25 3 3 3
opacity: 0.9
@onEnter: modules.client_stats.toggle()
@onEscape: modules.client_stats.toggle()
$mobile:
size: 550 300
ScrollablePanel
id: debugPanel
@@ -42,17 +48,6 @@ MainWindow
id: luaRamUsage
text: -
DebugLabel
!text: tr('Render')
DebugText
id: adaptiveRender
text: -
DebugText
id: render
text: -
DebugText
id: atlas
text: -
@@ -71,6 +66,17 @@ MainWindow
id: mainStats
text: -
DebugLabel
!text: tr('Render')
DebugText
id: adaptiveRender
text: -
DebugText
id: render
text: -
DebugLabel
!text: tr('Dispatcher')